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.