rust/library/std/src/os
Matthias Krüger 60bbb533df
Rollup merge of #147205 - alexcrichton:wasip3, r=davidtwco
Add a new `wasm32-wasip3` target to Rust

This commit adds a new tier 3 target to rustc, `wasm32-wasip3`. This follows in the footsteps of the previous `wasm32-wasip2` target and is used to represent binding to the WASIp3 set of APIs managed by the WASI subgroup to the WebAssembly Community Group.

As of now the WASIp3 set of APIs are not finalized nor standardized. They're in the process of doing so and the current trajectory is to have the APIs published in December of this year. The goal here is to get the wheels turning in Rust to have the target in a
more-ready-than-nonexistent state by the time this happens in December.

For now the `wasm32-wasip3` target looks exactly the same as `wasm32-wasip2` except that `target_env = "p3"` is specified. This indicates to crates in the ecosystem that WASIp3 APIs should be used, such as the [`wasip3` crate]. Over time this target will evolve as implementation in guest toolchains progress, notably:

* The standard library will use WASIp3 APIs natively once they're finalized in the WASI subgroup.
* Support through `wasi-libc` will be updated to use WASIp3 natively which Rust will then transitively use.
* Longer-term, features such as cooperative multithreading will be added to the WASIp3-track of targets to enable using `std::thread`, for example, on this target.

These changes are all expected to be non-breaking changes for users of this target. Runtimes supporting WASIp3, currently Wasmtime and Jco, support WASIp2 APIs as well and will work with components whether or not they import WASIp2, both WASIp2 and WASIp3, or just WASIp3 APIs. This means that changing the internal implementation details of libstd over time is expected to be a non-breaking change.

[`wasip3` crate]: https://crates.io/crates/wasip3
2025-10-07 19:39:07 +02:00
..
aix Reformat use declarations. 2024-07-29 08:26:52 +10:00
android Update version placeholders 2025-07-01 10:54:33 -07:00
cygwin Add socket extensions for cygwin 2025-09-06 20:23:37 +08:00
darwin initial implementation of the darwin_objc unstable feature 2025-09-13 16:06:22 -07:00
dragonfly Reformat use declarations. 2024-07-29 08:26:52 +10:00
emscripten Avoid use of LFS64 symbols on Emscripten 2025-01-01 13:21:19 +01:00
espidf Reformat use declarations. 2024-07-29 08:26:52 +10:00
fd replace version placeholder 2025-04-09 12:29:59 +01:00
fortanix_sgx Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
freebsd Reformat use declarations. 2024-07-29 08:26:52 +10:00
fuchsia Add definitions for riscv64gc-unknown-fuchsia 2023-04-25 16:42:59 -07:00
haiku Reformat use declarations. 2024-07-29 08:26:52 +10:00
hermit std: move network code into sys 2025-02-02 19:12:06 +01:00
horizon Fix warnings when checking armv6k-nintendo-3ds 2024-07-21 20:12:54 -04:00
hurd Forbid unsafe_op_in_unsafe_fn in hurd-specific os and sys files 2024-12-11 01:02:10 +01:00
illumos std::net: adding unix_socket_exclbind feature for solaris/illumos. 2025-06-10 19:44:45 +01:00
ios Make std::os::darwin public 2024-08-13 23:50:33 +02:00
l4re Reformat use declarations. 2024-07-29 08:26:52 +10:00
linux Update version placeholders 2025-07-01 10:54:33 -07:00
macos Make std::os::darwin public 2024-08-13 23:50:33 +02:00
net Rollup merge of #140482 - devnexen:tcp_deferaccept_toduration, r=joboet 2025-09-28 18:13:10 +02:00
netbsd Reformat use declarations. 2024-07-29 08:26:52 +10:00
nto Update library/std/src/os/nto/mod.rs 2023-03-01 06:42:40 +01:00
nuttx Fix a copy-paste issue in the NuttX raw type definition 2024-11-14 14:50:30 +08:00
openbsd Reformat use declarations. 2024-07-29 08:26:52 +10:00
raw Remove Windows dependency on libc 2024-05-20 11:13:31 -04:00
redox Reformat use declarations. 2024-07-29 08:26:52 +10:00
rtems Port std library to RTEMS 2024-09-03 09:19:29 +02:00
solaris std::net: adding unix_socket_exclbind feature for solaris/illumos. 2025-06-10 19:44:45 +01:00
solid Add safe new to NotAllOnes 2025-02-14 12:00:13 +00:00
trusty Remove unused file 2025-03-10 14:19:27 -07:00
uefi use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
unix std: merge address family computation 2025-09-30 17:10:22 +02:00
vita Add forbid(unsafe_op_in_unsafe_fn) 2024-07-28 21:10:59 +03:00
vxworks Forbid unsafe_op_in_unsafe_fn in vxworks specific os and sys files 2024-08-03 08:00:39 +05:30
wasi Remove stable attribute from wasi fs (read_exact|write_all)_at 2025-05-10 23:55:51 +00:00
wasip2 WASI fixing unsafe_op_in_unsafe_fn for std::{os, sys} 2024-08-05 09:48:26 +01:00
windows Update CURRENT_RUSTC_VERSION post-bump 2025-09-26 18:41:32 -04:00
xous use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
mod.rs Add a new wasm32-wasip3 target to Rust 2025-10-02 15:09:09 -07:00