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.

npm Browser Package Tutorial

The goal of this tutorial is to introduce you to the wasm-pack workflow by building a small npm package designed to be used in a browser application.

This tutorial is aimed at folks who are both beginners to WebAssembly and Rust- you don't need much Rust knowledge to complete this tutorial.

Be sure to have done the following before starting:

  1. Install wasm-pack
  2. Read and install the Prerequisites.

⚠️ We strongly recommend that you install Node.js using a version manager. You can learn more here.