#cli #server #wasm #development #live-server

app wasm-server

A simple WASM dev server with live reloading

3 stable releases

1.0.2 Jan 27, 2021
1.0.0 Jan 25, 2021

#42 in #development

Download history 4/week @ 2022-01-28 3/week @ 2022-02-18 5/week @ 2022-02-25 3/week @ 2022-03-04 7/week @ 2022-03-11 15/week @ 2022-03-18 3/week @ 2022-03-25 1/week @ 2022-04-01 3/week @ 2022-04-15 6/week @ 2022-04-22 27/week @ 2022-04-29 22/week @ 2022-05-06 53/week @ 2022-05-13

108 downloads per month

MIT/Apache

26KB
146 lines

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]

Dependencies

~51MB
~1M SLoC