Messing around with WASM, Rust and JS
🛠️ Pre-requirements 🛠️
Required tools to be installed on the machine
The webassembly binary tool - WABT including:
- wat2wasm
- wasm2wat
- wasmobj-dump
Terminal commands under the-clock/example-with-wat
directory
Build the wasm binary:
wat2wasm clock.wat -o clock.wasm
Serve the HTML file:
python3 -m http.server 8888
Go to http://localhost:8888/clock_test.html
Terminal commands under the-clock/example-with-rust
directory
Build the wasm module and JS package with wasm-pack:
wasm-pack build --target web
Serve the HTML file:
python3 -m http.server 8888