From 8a7af0e7f6e2bdd256108bd19d3c3d8088f642a0 Mon Sep 17 00:00:00 2001 From: Colin Murphy Date: Mon, 4 Nov 2024 12:26:50 -0500 Subject: [PATCH 1/2] fix: enable wasip2 feature for wasm32-wasip2 target Signed-off-by: Colin Murphy --- Cargo.toml | 2 +- src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0204a47d8..a4ca33bea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" keywords = ["api", "file", "network", "safe", "syscall"] categories = ["os::unix-apis", "date-and-time", "filesystem", "network-programming"] include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md", "benches"] -rust-version = "1.63" +rust-version = "1.82" [dependencies] bitflags = { version = "2.4.0", default-features = false } diff --git a/src/lib.rs b/src/lib.rs index 406a5a620..786f9c1d9 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. From 5095b8c494262799ec8dadcd9d822cdf58e8f00b Mon Sep 17 00:00:00 2001 From: Colin Murphy Date: Mon, 4 Nov 2024 15:13:40 -0500 Subject: [PATCH 2/2] Do not change MSRV --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a4ca33bea..0204a47d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" keywords = ["api", "file", "network", "safe", "syscall"] categories = ["os::unix-apis", "date-and-time", "filesystem", "network-programming"] include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md", "benches"] -rust-version = "1.82" +rust-version = "1.63" [dependencies] bitflags = { version = "2.4.0", default-features = false }