Skip to content

soltrinox/wasm-server-runner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

[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:https://127.0.0.1:1334

The website will reload when the server is restarted and serve files relative to the current directory.

About

cargo run for the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 78.3%
  • HTML 21.7%