| Crates.io | wasm-server |
| lib.rs | wasm-server |
| version | 1.0.2 |
| created_at | 2021-01-25 21:52:41.704325+00 |
| updated_at | 2021-01-27 13:01:04.297986+00 |
| description | A simple WASM dev server with live reloading |
| homepage | |
| repository | |
| max_upload_size | |
| id | 346645 |
| size | 98,594 |
Automatically compiles and runs your WASM code; Without configuration and without touching HTML or Javascript.
cargo install wasm-server
create project
wasm-pack new <name>
create a main method in src/lib.rs
#[wasm_bindgen]
pub fn main() {
utils::set_panic_hook();
...
}
=> this method gets called by the wasm-server when the website loads.
Just start it in the root directory of your project:
wasm-server [absolute path to project]