2021-09-13 12:35:40 +00:00
|
|
|
# WASM example
|
|
|
|
|
|
|
|
Examples use a CLI tool named `wasm-pack` to build this example:
|
|
|
|
|
|
|
|
```
|
2023-09-30 05:42:59 +00:00
|
|
|
cargo install wasm-pack --version 0.12.1
|
2021-09-13 12:35:40 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## 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
|
|
|
|
```
|
|
|
|
|
2023-09-30 05:34:22 +00:00
|
|
|
Then, open a browser at http://127.0.0.1:8000 and watch the ticker print entries to the window.
|