Description
🐛 Bug description
When I followed the official document Rust and WebAssembly
and coded the example Conway's Game of Life
, I failed to run wasm-pack build
. Error Message as below:
Fatal: error in validating input
Error: failed to execute ``wasm-opt``: exited with exit code: 1
full command: "C:\\Users\\Simon\\AppData\\Local\\.wasm-pack\\wasm-opt-171374efd61df962\\wasm-opt.exe" "C:\\projects\\learn-rust\\wasm-game-of-life\\pkg\\wasm_game_of_life_bg.wasm" "-o" "C:\\projects\\learn-rust\\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
.`
Even though I disabled wasm-opt = false
, the compiled process was passed but it failed to work with the glue code. I mean, run npm run start
it did not work as expected.
the Rust code is the same as the example in the Doc Rust and WebAssembly
.
🤔 Expected Behavior
I want to know it is a bug? or something wrong I did?
I am totally a beginner on Rust & WebAssembly, hope you guys can help me.
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: wasm-pack 0.9.1
rustc version: rustc 1.45.0 (5c1f21c3b 2020-07-13)
wee_alloc
version: 0.4.5
wasm-bindgen
version: 0.2.63
opt-level
: 's'
Platform: Windows 10
IDE: VS code