diff options
| author | Ulf Lilleengen <[email protected]> | 2021-09-13 14:35:40 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2021-09-13 16:42:39 +0200 |
| commit | e24528051b9ed26157bee93e32e37e7b06b8f4cc (patch) | |
| tree | bb0c4f201a6a7df9099d27b3a64f92036d645d45 /examples/wasm/README.md | |
| parent | f1c35b40c74db489da8e04f1c2e87a1d4030c617 (diff) | |
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
Diffstat (limited to 'examples/wasm/README.md')
| -rw-r--r-- | examples/wasm/README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/wasm/README.md b/examples/wasm/README.md new file mode 100644 index 000000000..4bed4a797 --- /dev/null +++ b/examples/wasm/README.md | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # WASM example | ||
| 2 | |||
| 3 | Examples use a CLI tool named `wasm-pack` to build this example: | ||
| 4 | |||
| 5 | ``` | ||
| 6 | cargo install wasm-pack | ||
| 7 | ``` | ||
| 8 | |||
| 9 | ## Building | ||
| 10 | |||
| 11 | To build the example, run: | ||
| 12 | |||
| 13 | ``` | ||
| 14 | wasm-pack build --target web | ||
| 15 | ``` | ||
| 16 | |||
| 17 | ## Running | ||
| 18 | |||
| 19 | To run the example, start a webserver server the local folder: | ||
| 20 | |||
| 21 | |||
| 22 | ``` | ||
| 23 | python -m http.server | ||
| 24 | ``` | ||
| 25 | |||
| 26 | Then, open a browser at https://127.0.0.1:8000 and watch the ticker print entries to the window. | ||
