From a9649aaf2847bfa4d3bc4c15577d07e4536d01bd Mon Sep 17 00:00:00 2001 From: Colin Murphy Date: Wed, 6 Nov 2024 09:15:08 -0500 Subject: [PATCH] Add "unstable" feature for wasip2 stdlib Signed-off-by: Colin Murphy --- Cargo.toml | 1 + src/lib.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6bc5e0d3e..d300b3dfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,3 +37,4 @@ doc-comment = "0.3" [features] nightly = [] +unstable = [] diff --git a/src/lib.rs b/src/lib.rs index ea4933856..ada014e20 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,9 @@ // wasip2 conditionally gates stdlib APIs. // https://github.com/rust-lang/rust/issues/130323 -#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))] +#![cfg_attr( + all(target_os = "wasi", target_env = "p2", feature = "unstable"), + feature(wasip2) +)] //! Temporary files and directories. //! //! - Use the [`tempfile()`] function for temporary files