Allows you to run programs in the browser using web assembly using a simple cargo run.
cargo install wasm-server-runnerAdd this to your ~/.cargo/config.toml (not the Cargo.toml of your project!):
[target.wasm32-unknown-unknown]
runner = "wasm-server-runner"Run programs in the browser using
cargo run --target wasm32-unknown-unknown
cargo run --target wasm32-unknown-unknown --example example
wasm-server-runner path/to/file.wasmExample output:
INFO wasm_server_runner: wasm output is 49.79kb large
INFO wasm_server_runner::server: starting webserver at http://127.0.0.1:1334The website will reload when the server is restarted and serve files relative to the current directory.