From 4441e52d31977746be484f88304e2c466d3fea16 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 30 Sep 2025 16:54:05 -0700 Subject: [PATCH] wasip2: Invert conditional to include p2 APIs This commit switches `cfg(target_feature = "p2")` to instead using `cfg(not(target_feature = "p1"))` to be more future-proof of new Rust targets such as `wasm32-wasip3`. All future targets will support the same set of functionality in `wasm32-wasip2`, so this should be valid for future targets. --- src/wasi/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wasi/mod.rs b/src/wasi/mod.rs index 64459c2095c9..70e37525cc1a 100644 --- a/src/wasi/mod.rs +++ b/src/wasi/mod.rs @@ -846,7 +846,7 @@ extern "C" { } cfg_if! { - if #[cfg(target_env = "p2")] { + if #[cfg(not(target_env = "p1"))] { mod p2; pub use self::p2::*; }