Rust theorytheory 0/50 · 0%
Systems · hard

45. Rust and WebAssembly

Shipping Rust to the browser.

wasm-bindgen and wasm-pack compile Rust to WebAssembly with JavaScript bindings, powering in-browser crypto, parsers and even this site's tooling. Keep binaries small with opt-level="z", LTO and wee_alloc, and avoid threads unless the host enables them.

Check your understanding

  1. 1. Which tool bridges Rust and JS types?

  2. 2. Which setting reduces wasm size?