cargo-component
cargo-component copied to clipboard
Use wasm-wasip2 target as default build target
https://github.com/bytecodealliance/cargo-component/blob/1e58afa097e153797e4195cf3f2bc749a3654f31/README.md?plain=1#L184
Hi! I saw this today, but the referred issue has been closed as complete. The latest cargo-component 0.19 still uses wasm-wasip1 as the default build target.
Rust in the latest stable 1.82 has promoted wasm-wasip2 as a tier-2 target, see https://github.com/rust-lang/rust/issues/129997. I think it's time to change the README and the behavior of cargo-component?
Related: https://github.com/bytecodealliance/cargo-component/pull/356
Yes. The current situation is, the wasm32-wasip2 target does a lot of things automatically, which is great and makes it easy to drop into existing Rust development workflows. But, it also doesn't support all the features of cargo component. I looked into it briefly, and didn't see anything supporting import name maps. So there's more to figure out here before we can switch cargo component to using wasm32-wasip2 internally.
I've also now posted https://github.com/bytecodealliance/cargo-component/pull/359 to update the README text quoted above.
OK, thanks. I am not super familiar with cargo-component.
I think this issue can be turned into a tracker if you can list missing features on the wasm32-wasip2 target.