8 unstable releases (3 breaking)
0.4.0 | Oct 27, 2022 |
---|---|
0.3.0 | Sep 2, 2022 |
0.2.4 | Jun 1, 2022 |
0.2.3 | May 12, 2022 |
0.1.0 | Dec 10, 2021 |
#486 in WebAssembly
425 downloads per month
Used in bevy_spatial
18KB
231 lines
wasm-server-runner
Allows you to run programs in the browser using web assembly using a simple cargo run
.
Usage
Step 1.
cargo install wasm-server-runner
Step 2.
Add this to your ~/.cargo/config.toml
(not the Cargo.toml
of your project!):
[target.wasm32-unknown-unknown]
runner = "wasm-server-runner"
Step 3.
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.wasm
Example output:
INFO wasm_server_runner: wasm output is 49.79kb large
INFO wasm_server_runner::server: starting webserver at http://127.0.0.1:1334
The website will reload when the server is restarted and serve files relative to the current directory.
Dependencies
~36MB
~779K SLoC