bytecodealliance / cargo-wasi

A lightweight Cargo subcommand to build Rust code for the `wasm32-wasi` target
https://bytecodealliance.github.io/cargo-wasi/
Apache License 2.0
444 stars 29 forks source link

Download wasm-opt 113 to support sign-ext instructions #138

Closed jeffcharles closed 1 year ago

jeffcharles commented 1 year ago

Fixes #137.

Rust 1.70 started emitting sign-ext instructions in its Wasm output which wasm-opt 109 cannot validate. wasm-opt 111 introduced support for these instructions.

Also including a change I seemed to need to make to get a wasm_bindgen test passing in CI.

jeffcharles commented 1 year ago

Looks like cargo test is failing on https://github.com/bytecodealliance/cargo-wasi/blob/c3d544a11edd3e09b668026984af5a0551644d2f/tests/tests/main.rs#L323-L339. Not sure why given this doesn't bindgen.

jeffcharles commented 1 year ago

For context on the test failures, the bindgen tests were outputting

failed to create process WASM_INTERFACE_TYPES="1" "my-wasm-bindgen" [...]

instead of the expected

failed to create process "my-wasm-bindgen" [...]
sunfishcode commented 1 year ago

LGTM!