Skip to content

Commit 23b9be7

Browse files
committed
fix: enable wasip2 feature for wasm32-wasip2 target
1 parent fa8ad00 commit 23b9be7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fastrand = "2.1.1"
2323
once_cell = { version = "1.19.0", default-features = false, features = ["std"] }
2424

2525
[target.'cfg(any(unix, target_os = "wasi"))'.dependencies]
26-
rustix = { version = "0.38.37", features = ["fs"] }
26+
rustix = { version = "0.38.39", features = ["fs"] }
2727

2828
[target.'cfg(windows)'.dependencies.windows-sys]
2929
version = ">=0.52,<=0.59"

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// wasip2 conditionally gates stdlib APIs.
2+
// https://github.com/rust-lang/rust/issues/130323
3+
#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
14
//! Temporary files and directories.
25
//!
36
//! - Use the [`tempfile()`] function for temporary files

0 commit comments

Comments
 (0)