I've opened a PR to rustc creating a new target for wasm32-wasi-preview2
.
So far the only aspect that's up for debate is the cfg flag that controls whether code gets compiled for preview1 or preview2. The PR originally laid out preview2 as different OS (i.e., #[cfg(target_os ="wasi-preview2")]
), but a commenter suggested using target_env
instead. It seems like we'll be going with target_env
, and you can read the discussion of why here. Please leave your opinion if you disagree with where we've landed!
Last updated: Feb 27 2025 at 23:03 UTC