This is the unpublished documentation of wasm-pack, the published documentation is available on the main Rust and WebAssembly documentation site . Features documented here may not be available in released versions of wasm-pack.

Quickstart

  1. Install rust using rustup.
  2. Install this tool.
  3. Run wasm-pack new hello-wasm.
  4. cd hello-wasm
  5. Run wasm-pack build.
  6. This tool generates files in a pkg dir
  7. To publish to npm, run wasm-pack publish. You may need to login to the registry you want to publish to. You can login using wasm-pack login.