You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cargo component does not obey .cargo/config.toml #364
cargo component itself uses the Rust wasm32-wasip1 target to produce core Wasm modules, and applies the component adapter to produce Wasm components. It doesn't currently work with the wasm32-wasip2 target.
Thanks @sunfishcode I also just ran into this issue.
Interestingly cargo component will actually create a .wasm file in the wasm32-**wasip2** path though:
And interestingly the wasip2 path has a newly generated .wasm file:
ls -lah target/wasm32-wasip2/debug/compress.wasm
Produces:
-rw-r--r-- 1 tpmccallum tpmccallum 8.4M 26 Feb 11:24 target/wasm32-wasip2/debug/compress.wasm
To prevent confusion, could the command warn/mention that "cargo component doesn't currently work with the wasm32-wasip2 target" and then only write to the target/wasm32-wasip1 path?
Activity
sunfishcode commentedon Jan 7, 2025
cargo component itself uses the Rust wasm32-wasip1 target to produce core Wasm modules, and applies the component adapter to produce Wasm components. It doesn't currently work with the wasm32-wasip2 target.
tpmccallum commentedon Feb 26, 2025
Thanks @sunfishcode I also just ran into this issue.
Interestingly cargo component will actually create a
.wasmfile in thewasm32-**wasip2**path though:Correctly produces:
ls: target/wasm32-wasip2/debug/compress.wasm: No such file or directoryIf we:
cargo component build --target wasm32-wasip2We get:
And interestingly the
wasip2path has a newly generated.wasmfile:ls -lah target/wasm32-wasip2/debug/compress.wasmProduces:
-rw-r--r-- 1 tpmccallum tpmccallum 8.4M 26 Feb 11:24 target/wasm32-wasip2/debug/compress.wasmTo prevent confusion, could the command warn/mention that "cargo component doesn't currently work with the wasm32-wasip2 target" and then only write to the
target/wasm32-wasip1path?