This is a fork of rustwasm/wasm_game_of_life that excludes the need for webpack based on the without a bundler example
npm install
npm run build
npm run start
wasm-pack build app --target web
and then serve the ./app folder
All Rust source files from the original rustwasm/wasm_game_of_life are located in the app folder. But the web files have been refactored and combined into a single index.html. In addition, we are using the --target web
switch and importing directly eliminating the need for web-pack.
ref: index.html import statements
import init, { Universe, Cell } from "./pkg/wasm_game_of_life.js";
const { memory } = await init();