rust/library/std/src
bors ef324565d0 Auto merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-se
Add a new `wasm32-wasi-preview2` target

This is the initial implementation of the MCP https://github.com/rust-lang/compiler-team/issues/694 creating a new tier 3 target `wasm32-wasi-preview2`. That MCP has been seconded and will most likely be approved in a little over a week from now. For more information on the need for this target, please read the [MCP](https://github.com/rust-lang/compiler-team/issues/694).

There is one aspect of this PR that will become insta-stable once these changes reach a stable compiler:
* A new `target_family` named `wasi` is introduced. This target family incorporates all wasi targets including `wasm32-wasi` and its derivative `wasm32-wasi-preview1-threads`. The difference between `target_family = wasi` and `target_os = wasi` will become much clearer when `wasm32-wasi` is renamed to `wasm32-wasi-preview1` and the `target_os` becomes `wasm32-wasi-preview1`. You can read about this target rename in [this MCP](https://github.com/rust-lang/compiler-team/issues/695) which has also been seconded and will hopefully be officially approved soon.

Additional technical details include:
* Both `std::sys::wasi_preview2` and `std::os::wasi_preview2` have been created and mostly use `#[path]` annotations on their submodules to reach into the existing `wasi` (soon to be `wasi_preview1`) modules. Over time the differences between `wasi_preview1` and `wasi_preview2` will grow and most like all `#[path]` based module aliases will fall away.
* Building `wasi-preview2` relies on a [`wasi-sdk`](https://github.com/WebAssembly/wasi-sdk) in the same way that `wasi-preview1` does (one must include a `wasi-root` path in the `Config.toml` pointing to sysroot included in the wasi-sdk). The target should build against [wasi-sdk v21](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-21) without modifications. However, the wasi-sdk itself is growing [preview2 support](https://github.com/WebAssembly/wasi-sdk/pull/370) so this might shift rapidly. We will be following along quickly to make sure that building the target remains possible as the wasi-sdk changes.
* This requires a [patch to libc](https://github.com/rylev/rust-libc/tree/wasm32-wasi-preview2) that we'll need to land in conjunction with this change. Until that patch lands the target won't actually build.
2024-02-27 20:57:38 +00:00
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections Add rustc_confusables annotations to some stdlib APIs 2024-02-22 18:04:55 +00:00
env remove redundant imports 2023-12-10 10:56:22 +08:00
error core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
f32 Add gamma and ln_gamma functions to f32 and f64 2023-07-31 07:41:50 -07:00
f64 Add gamma and ln_gamma functions to f32 and f64 2023-07-31 07:41:50 -07:00
ffi Add rustc_confusables annotations to some stdlib APIs 2024-02-22 18:04:55 +00:00
fs library: Fix a symlink test failing on Windows 2024-01-06 01:40:56 +03:00
hash update version placeholders 2023-12-22 11:01:42 +01:00
io Use generic NonZero everywhere in std. 2024-02-22 15:17:33 +01:00
net remove redundant imports 2023-12-10 10:56:22 +08:00
num removed nonfunctioning benchmark 2024-01-11 11:30:12 -05:00
os Auto merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-se 2024-02-27 20:57:38 +00:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path remove redundant imports 2023-12-10 10:56:22 +08:00
prelude Add Future and IntoFuture to the 2024 prelude 2024-02-18 23:20:05 +01:00
process Rollup merge of #114379 - RalfJung:command-removed-env-vars, r=m-ou-se 2023-09-22 12:15:25 +02:00
sync fix race between block initialization and receiver disconnection 2024-02-26 13:53:35 -05:00
sys Auto merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-se 2024-02-27 20:57:38 +00:00
sys_common library: use addr_of! 2024-02-24 16:02:17 +03:00
thread Rollup merge of #121530 - wgslr:master, r=Mark-Simulacrum 2024-02-24 22:39:00 +01:00
time Rollup merge of #103056 - beetrees:timespec-bug-fix, r=thomcc 2023-05-05 18:40:32 +05:30
alloc.rs libs: use assert_unchecked instead of intrinsic 2024-01-13 20:10:00 +01:00
ascii.rs Add the basic ascii::Char type 2023-05-03 22:09:33 -07:00
backtrace.rs rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
env.rs Add uncontroversial syscall doc aliases to std docs 2024-02-18 14:04:27 +00:00
error.rs Clean dead codes 2023-11-26 09:25:07 +08:00
f32.rs Bump version placeholders 2024-02-08 07:43:38 -05:00
f64.rs Bump version placeholders 2024-02-08 07:43:38 -05:00
fs.rs Add uncontroversial syscall doc aliases to std docs 2024-02-18 14:04:27 +00:00
keyword_docs.rs docs: Add example, reference link for type keyword. 2023-08-21 20:00:43 +07:00
lib.rs remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00
macros.rs added column number to dbg!() 2023-12-12 18:12:23 +08:00
num.rs Switch NonZero alias direction. 2024-01-27 16:38:57 +01:00
panic.rs Store SHOULD_CAPTURE as AtomicU8 2024-01-31 13:58:52 +00:00
panicking.rs rename 'try' intrinsic to 'catch_unwind' 2024-02-26 11:10:18 +01:00
path.rs Add rustc_confusables annotations to some stdlib APIs 2024-02-22 18:04:55 +00:00
process.rs Use generic NonZero everywhere in std. 2024-02-22 15:17:33 +01:00
rt.rs Cfg remove lang items in doctest 2023-12-15 16:17:28 +00:00
time.rs Auto merge of #116238 - tamird:gettimeofday, r=thomcc 2023-10-24 04:15:39 +00:00