The one-stop build tool for compiling Rust to WebAssembly and publishing the result as an npm package.
wasm-pack automates the full workflow of compiling a Rust crate to WebAssembly and packaging it for JavaScript consumption. A single wasm-pack build command invokes the Rust compiler, runs wasm-opt for size and performance optimization, generates JavaScript/TypeScript bindings via wasm-bindgen, and produces an npm-compatible package ready to publish or import. wasm-pack supports multiple targets including bundlers (webpack, Vite), Node.js, and plain browser ES modules, making it the default build tool for the Rust/Wasm ecosystem.
The standard library for high-level Rust ↔ JavaScript interop in WebAssembly projects.
The official guide from the Rust WebAssembly Working Group — from setup through publishing a crate to npm.
A Cargo subcommand that streamlines building Wasm components from Rust with automatic WIT binding generation.