Files
rust/library/std
Jacob PrattandGitHub 5c3196f6ee Rollup merge of #159731 - alexcrichton:wasip3-futex, r=clarfonthey
std: Implement futex on wasip3 targets, update target spec

This commit is in preparation for eventual [tier 2 status] for the `wasm32-wasip3` target. Initially this target will not have support for threads but it's expected to come ~later this year. The first step in supporting this is switching internal `#[cfg]` in the standard library to "ok this target has threads", and this commit is the update for synchronization primitives. All synchronization primitives on the `wasm32-wasip3` now use a `futex`-based implementation, and the implementation of the futex itself is located in wasi-libc (see WebAssembly/wasi-libc#834). Other WASI targets can eventually all use this implementation as well, but `wasi-libc`'s implementation of these symbols will need to percolate, so those targets aren't changed yet. For `wasm32-wasip3`, however, any supporting `wasi-libc` will have these symbols.

This then additionally fixes the target to actually build with a modern LLVM by passing a necessary flag to `wasm-ld`. This flag isn't supported until LLVM 23, but the `wasm32-wasip3` target isn't fully supported until LLVM 23 anyway (hence its Tier 3 status currently).

[tier 2 status]: https://github.com/rust-lang/compiler-team/issues/1001
2026-07-24 01:59:22 -04:00
..
2026-06-30 09:01:03 +00:00
2026-07-22 10:49:07 +08:00