A Conway's Game of Life implementation with Rust and WebAssembly.
Built with 🦀🕸 by The Rust and WebAssembly Working Group
This is a simple project that demonstrates how to write a web app without a single line of JavaScript code.
- DOM operations via
web-sys
- Use 2D canvas to render the graphics
- Event handling (including timer, mouse events)
- Heap memory accessing
Math.random
viajs-sys
- Less than 500 sloc, no boilerplate interop code (thanks to
wasm-bindgen
)
Just try the online demo here.
Before build the project, make sure you have installed these dependencies:
- Node
- Rust (rustup is recommended)
- wasm-pack
Note that Webpack is not required by this project, feel free to not install that :)
If you're all set, then:
git clone https://github.com/unixzii/game-of-life.git
cd game-of-life
make
Finally, start a web server and open index.html
in your favorite browser.
This project is licensed under MIT license.