No unpredictable garbage collection pauses. No JIT compiler performance cliffs. Just low-level control coupled with high-level ergonomics.
Small code size means faster page loads. Rust-generated
.wasm doesn’t include extra bloat, like a garbage
collector. Advanced optimizations and tree shaking remove dead code.
A lively ecosystem of libraries to help you hit the ground running. Expressive, zero-cost abstractions. And a welcoming community to help you learn.
Publish Rust WebAssembly packages to package registries like npm.
Bundle and ship them with WebPack, Parcel, and others.
Maintain them with tools like
npm audit and Greenkeeper.
Take advantage of libraries like
provide pre-packaged bindings for the entire web platform.
We can compile Rust to WASM, and call it from Serverless functions woven into the very fabric of the Internet. That’s huge and I can’t wait to do more of it.
– Steven Pack, Serverless Rust with Cloudflare Workers
source-maplibrary] has accumulated convoluted code in the name of performance, and we replaced it with idiomatic Rust. Rust does not force us to choose between clearly expressing intent and runtime performance.
– Nick Fitzgerald, Oxidizing Source Maps with Rust and WebAssembly
[Rust’s] properties make it easy to embed the DivANS codec in a webpage with WASM, as shown above.
– Daniel Reiter Horn and Jongmin Baek, Building Better Compression Together with DivANS