From 2b4becf8a34a300d23ec924814fcbed2a2474758 Mon Sep 17 00:00:00 2001 From: Colin D Murphy Date: Mon, 4 Nov 2024 15:26:10 -0500 Subject: [PATCH] fix: enable wasip2 feature for wasm32-wasip2 target (#1205) * fix: enable wasip2 feature for wasm32-wasip2 target Signed-off-by: Colin Murphy * Do not change MSRV --------- Signed-off-by: Colin Murphy --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index e53e263ab..aee4005a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +// wasip2 conditionally gates stdlib APIs. +// https://github.com/rust-lang/rust/issues/130323 +#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))] //! `rustix` provides efficient memory-safe and [I/O-safe] wrappers to //! POSIX-like, Unix-like, Linux, and Winsock syscall-like APIs, with //! configurable backends.