From b35f80f7f71336b1b22c5de4af9eb8e6b59cb8f5 Mon Sep 17 00:00:00 2001 From: oligamiq Date: Sun, 18 Jan 2026 23:37:51 +0900 Subject: [PATCH] fix: thread creation failed on the wasm32-wasip1-threads target. --- library/std/src/sys/thread/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/thread/unix.rs b/library/std/src/sys/thread/unix.rs index 6f23c28c04d6a..5a210703ce9b7 100644 --- a/library/std/src/sys/thread/unix.rs +++ b/library/std/src/sys/thread/unix.rs @@ -49,7 +49,7 @@ impl Thread { // WASI does not support threading via pthreads. While wasi-libc provides // pthread stubs, pthread_create returns EAGAIN, which causes confusing // errors. We return UNSUPPORTED_PLATFORM directly instead. - if cfg!(target_os = "wasi") { + if cfg!(all(target_os = "wasi", not(target_feature = "atomics"))) { return Err(io::Error::UNSUPPORTED_PLATFORM); }