3 ms·
Here's an example: I wanted to have decent hashing performance in JavaScript (large file uploads protected against bitrot). There are a hodgepodge of different
by acdha 8y ago
Here's an example: I wanted to have decent hashing performance in JavaScript (large file uploads protected against bitrot). There are a hodgepodge of different JavaScript libraries with inconsistent algorithm support and performance characteristics; SubtleCrypto is becoming more standard but has limited algorithm support and doesn't support efficient operations on large inputs.
With https://github.com/acdha/wasm-hashing https://github.com/acdha/wasm-hashing I was able to use the high-quality Rust hashing system to support all of the different algorithms I needed with a consistent interface and performance was actually competitive with or better than the browsers' native SubtleCrypto implementation.
That's a really nice capability to have in your back pocket, especially since it comes with Rust's usual assistance for code-quality.
- steveklabnik 8y agoThat’s very cool! Is there a reason you’re using wasm-bindgen directly instead of using wasm-pack?
- acdha 8y agoWhen I started wasm-pack was still moving pretty rapidly and it took a lot longer to do builds when I was working interactively. Now that the split went through I've been meaning to revisit that.
- steveklabnik 8y agoAh, cool :) if it goes poorly, I’m sure the team would love to know!
- acdha 8y agoThey've posted a lot of interesting updates since I last worked on that. Might be time to dust that project off.