rustwasm.github.io icon indicating copy to clipboard operation
rustwasm.github.io copied to clipboard

Tutorial fails to build when wasm-opt is enabled

Open onatm opened this issue 5 years ago • 1 comments

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

onatm avatar Oct 29 '20 13:10 onatm

It seems I opened this issue in the wrong repo, sorry about that. Shall I close this and re-open in docs?

onatm avatar Oct 29 '20 13:10 onatm