wasm32-unknown-unknown
should be already installed byrust-toolchain.toml
, but if you encounter some problem, run:
rustup target add wasm32-unknown-unknown
wasm-bindgen
cargo install wasm-bindgen-cli
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --out-dir www/src/assets/simulation --target web ./target/wasm32-unknown-unknown/release/simulation.wasm