Example Rust and WebAssembly with an interactive UI
Developed and tested within Docker using the supplied Dockerfile:
cd game-of-tag
make app
> Docker image ready for shell access. Ctrl-C
make shell
yarn test
yarn wasm:build
yarn wasm:start
> UI available on http://localhost:8080/
The demo is made up of:
/code/
- Makefile -> Build development environment, start shell
- package.json -> Run yarn scripts from within docker shell
/src/ -> Rust lib, also built with wasm-pack
/src/bin/ -> Rust cli
/pkg/ -> WASM npm module generated by yarn wasm:build
/www/ -> Web UI dev, depends on pkg, hot-reload via webpack-dev-server
/www/dist/ -> Web UI release build
/docs/ -> Copy of /www/dist/ for demo hosted on Github Pages