This is a minimal example of the gcode-rs crate with web assembly.
Follow the instructions at https://www.rust-lang.org/tools/install and follow the installation
link at wasm-pack
.
Enter wasm-pack build --target web
from your project's root directory.
Enter rollup ./main.js --format iife --file ./pkg/bundle.js
from your project's root directory.
Run a webserver from your project's root directory, such as with python3 -m http.server
, and load http://localhost:8000/ in a browser to run the app.
Access your generated build artifacts, bundle.js
and yew_wasm_pack_minimal_bg.wasm
, in ./pkg from your project's root directory.