My implementation of Conway's Game of Life in Rust + WASM, following the rust wasm book.
Built with 🦀🕸
Conway's Game of Life is essentially the "Hello world!" of Rust + WASM
- Double buffered cells vec to reduce render time
- Speed slider to adjust max framerate
- Remove modulo operators from tick() to reduce render time
- Use webGL instead of canvas
- Rust-only fork (use a no js framework)
- Improve UI
You'll need to install wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
or if you're on macOS (the way I did it)
brew install wasm-pack
Then make sure you're in the root directory and run:
wasm-pack build
Make sure npm is installed. cd
to the www
directory.
Ensure all modules are installed:
npm install
Then execute this command:
npm run start
Open http://localhost:8080 in your browser.