wasm-server

Crates.iowasm-server
lib.rswasm-server
version1.0.2
sourcesrc
created_at2021-01-25 21:52:41.704325
updated_at2021-01-27 13:01:04.297986
descriptionA simple WASM dev server with live reloading
homepage
repository
max_upload_size
id346645
size98,594
(FalkZ)

documentation

README

WASM Live Server

Automatically compiles and runs your WASM code; Without configuration and without touching HTML or Javascript.

Install

cargo install wasm-server

Project Setup

  1. create project

    wasm-pack new <name>
    
  2. 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.

Usage

Just start it in the root directory of your project:

wasm-server [absolute path to project]
Commit count: 0

cargo fmt