Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/game-of-life/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,47 @@ Anytime you make changes and want them reflected on
[http://localhost:8080/](http://localhost:8080/), just re-run the `wasm-pack
build` command within the `wasm-game-of-life` directory.

### Server fails to start - updating package dependencies

Depending on versions of `nodejs` and `wasm-bindgen` that you are using in your system,
it may be required to upgrade versions of packages included in `devDependencies`
section of `package.json` in `www` folder in case of server not being able to start
with default setup due to startup errors.

For example, the setup that works with nodejs `v23.11.0` and wasm-bindgen `0.2.100` is:
```json
"devDependencies": {
"hello-wasm-pack": "^0.1.0",
"webpack": "^5.98.0",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.1",
"copy-webpack-plugin": "^5.0.0"
}

```

The module also needs to be flagged as WebAssembly in `www/webpack.config.js` file:
```js
module.exports = {
//...
experiments: {
asyncWebAssembly: true,
},
//...
};
```

Since we modified dependencies, we need to install it:
```text
npm install
```

and then try to start the server again:

```
npm run start
```

## Exercises

* Modify the `greet` function in `wasm-game-of-life/src/lib.rs` to take a `name:
Expand Down