Conway's Game of Life built in Rust + WebAssembly.
Resources:
This project requires:
rust
: Language of choice to compile to wasm (installation instructions).wasm-pack
: Compiles rust code a wasm package we can use in javascript (installation instructions).vite
: To bundle and serve the webpage (npm install -g vite
).
First, we compile the rust code to a wasm package via wasm-pack
:
wasm-pack build --target web ./
The package is outputted to pkg/
, which can be imported by index.js
. Then we serve our index.html
and index.js
files with vite
:
vite ./