An exersise in Rust and WASM implementing Conway's Game of Life
- Make sure you have Rust (v 1.30 and up) installed
- Make sure you have wasm-pack installed
- Make sure you have npm installed
- Make sure you have the
wasm32-unknown-unknown
target (runrustup target list | grep wasm
)
- Go to the
www
folder and runnpm i
in order to install all Javascript dependencies - Go to the game's root folder and run
wasm-pack build
This will install all dependencies needed for compiling the game to wasm (it takes some time)
- Link the wasm module to npm by going into the newly generated folder
pkg
and runningnpm link
. Then go to thewww
folder and runnpm link wasm-game-of-life
- Go to the
www
folder and runnpm start