mktemp: build for wasip1

This commit is contained in:
oech3
2026-05-16 16:42:54 +02:00
committed by Daniel Hofstetter
parent d09f351cba
commit 597a42ab0c
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
CARGO_TARGET_WASM32_WASIP1_RUNNER: wasmtime
run: |
# Get all utilities and exclude ones that don't compile for wasm32-wasip1
EXCLUDE="df|du|env|expr|mktemp|more|tac|test"
EXCLUDE="df|du|env|expr|more|tac|test"
UTILS=$(./util/show-utils.sh | tr ' ' '\n' | grep -vE "^($EXCLUDE)$" | sed 's/^/-p uu_/' | tr '\n' ' ')
cargo test --target wasm32-wasip1 --no-default-features $UTILS
- name: Run integration tests via wasmtime
+1
View File
@@ -206,6 +206,7 @@ feat_wasm = [
"ln",
"ls",
"mkdir",
"mktemp",
"mv",
"nl",
"nproc",
+1 -1
View File
@@ -551,7 +551,7 @@ fn make_temp_dir(dir: &Path, prefix: &str, rand: usize, suffix: &str) -> UResult
// The directory is created with these permission at creation time, using mkdir(3) syscall.
// This is not relevant on Windows systems. See: https://docs.rs/tempfile/latest/tempfile/#security
// `fs` is not imported on Windows anyways.
#[cfg(not(windows))]
#[cfg(unix)]
builder.permissions(fs::Permissions::from_mode(0o700));
match builder.tempdir_in(dir) {