To use rust and webassembly requires installing a fair amount of tooling. I decided to create a docker image with everything required:

  • rust 1.30
  • wasm-pack
  • cargo-generate
  • nodejs
  • yarn
  • exposes port 8080 and port 5000

It is available on docker hub:

To pull the image: docker pull rnsloan/wasm-pack:1.0.0.


To use wasm-pack follow the guide here:


For instructions on how to use .wasm files with JavaScript look at guides with JS bundling tools such as:

Manually compiling .wasm files can be tedious. There are ways to make this automated: