.wasm file from your app in the browser.
You can check out the Starter Templates to get up and running quickly or read on to learn more about your options.
This tool was created by the Rust / Wasm Working Group and is the most actively developed tool for building WebAssembly applications. It supports packaging code into
cargo install wasm-pack
This command will produce a bundle in the
For more information on Rollup visit this guide
rollup ./main.js --format iife --file ./pkg/bundle.js
Feel free to use your preferred server. Here we use a simple python server to serve to http://[::1]:8000.
python -m http.server 8000
Cargo web is a cargo subcommand for building client web apps. It makes building and deploying web applications incredibly easy. It is also the only toolchain that supports Emscripten targets. Read more here.
cargo install cargo-web
cargo web build
cargo web start