embassy/examples/wasm
Samuel Maier db00f3f5ec Enable critical-section/std on wasm
Without that feature one will find import errors on opening the webpage, that are hard to debug.
The feature was indirectly enabled in the wasm example, however the reason wasn't documented and thus it was easy to miss.
2024-09-05 11:45:49 +02:00
..
src ci: use beta, add secondary nightly ci. 2023-12-21 15:03:57 +01:00
Cargo.toml Enable critical-section/std on wasm 2024-09-05 11:45:49 +02:00
index.html Add WASM support for executor 2021-09-13 16:42:39 +02:00
README.md bump wasm-pack version 2023-09-30 05:42:59 +00:00

WASM example

Examples use a CLI tool named wasm-pack to build this example:

cargo install wasm-pack --version 0.12.1

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 http://127.0.0.1:8000 and watch the ticker print entries to the window.