FS#75269 - [rust-wasm] invalid import in wasm32-wasi binaries
Attached to Project:
Arch Linux
Opened by Julius Michaelis (jcaesar) - Friday, 08 July 2022, 01:22 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 31 January 2023, 05:40 GMT
Opened by Julius Michaelis (jcaesar) - Friday, 08 July 2022, 01:22 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 31 January 2023, 05:40 GMT
|
Details
Description:
wasm32-wasi binaries compiled by the rust/rust-wasm packages import env.__main_argc_argv and thus don't follow the wasi spec and can't be run by wasmtime or wasmer. (Failing with: unknown import: `env::__main_argc_argv` has not been defined) This does not happen when using rustup. Additional info: * package version(s): rust-wasm 1.62.0-1 Steps to reproduce: (This is also reproducible on a normal install, but for a clean slate reproducer: docker.) docker run --rm -ti archlinux pacman -Syu rust-wasm wasmer cargo new baa cd baa cargo build --target wasm32-wasi wasmer inspect target/wasm32-wasi/debug/waa.wasm Outputs something like Imports: Functions: "env"."__main_argc_argv": [I32, I32] -> [I32] ... The same does not happen with pacman -Syu rustup rustup default 1.62.0 rustup target add wasm32-wasi |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Tuesday, 31 January 2023, 05:40 GMT
Reason for closing: Fixed
Additional comments about closing: rust-wasm 1.67.0
Tuesday, 31 January 2023, 05:40 GMT
Reason for closing: Fixed
Additional comments about closing: rust-wasm 1.67.0
(Apologies for the late reply.)
Looks like Rust 1.67 (in three weeks) will fix it, then.