Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Tutorial fails to build when wasm-opt is enabled #59

@onatm

Description

@onatm

Describe the Bug

Building the code on page Implementing Conway's Game of Life fails with the below error:

Error: failed to execute `wasm-opt`: exited with exit code: 1
  full command: "/Users/onat.mercan/Library/Caches/.wasm-pack/wasm-opt-a528729925722b63/wasm-opt" "/Users/onat.mercan/dev/wasm-game-of-life/pkg/wasm_game_of_life_bg.wasm" "-o" "/Users/onat.mercan/dev/wasm-game-of-life/pkg/wasm_game_of_life_bg.wasm-opt.wasm" "-O"
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.

Steps to Reproduce

  1. Follow the tutorial on page Implementing Conway's Game of Life until Rendering with JavaScript
  2. Run wasm-pack build

Additional Context

I managed to make it build by following the error produced and added the following line to Cargo.toml:

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions