Add WASM support for executor
* Adds an executor for WASM runtimes based on wasm_bindgen. * Add time driver based on JS time handling. * Add example that can run in browser locally. * Update to critical-section version that supports 'std' flag
This commit is contained in:
26
examples/wasm/README.md
Normal file
26
examples/wasm/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# WASM example
|
||||
|
||||
Examples use a CLI tool named `wasm-pack` to build this example:
|
||||
|
||||
```
|
||||
cargo install wasm-pack
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To build the example, run:
|
||||
|
||||
```
|
||||
wasm-pack build --target web
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
To run the example, start a webserver server the local folder:
|
||||
|
||||
|
||||
```
|
||||
python -m http.server
|
||||
```
|
||||
|
||||
Then, open a browser at https://127.0.0.1:8000 and watch the ticker print entries to the window.
|
Reference in New Issue
Block a user