Implementing the rustwasm tutorial of Conway's Game of Life using SvelteKit as the UI.
- Using pnpm as package manager
- Node v20
Install web dependencies:
pnpm install
Compile the wasm package via:
pnpm wasm
Run the development server:
pnpm dev
Visit: http://localhost:5173
- wasm-bindgen - allows JS/wasm to communicate with strings, JS objects, classes, etc, as opposed to purely integers and floats.
- wasm-pack vite-plugin: https://github.com/nshen/vite-plugin-wasm-pack
- Getting { memory } module to load since now using the
no bundlerstrategy. See link below (kudos!):- https://lionturkey.github.io/posts/rustwasm/rustwasm.html
- "In order to access memory used by Wasm without npm, we need to save the output of the init() function"
- Implement Hashlife