rust/library/std/src
León Orell Valerian Liehr e0a4f43903
Rollup 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-01-24 15:43:12 +01:00
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections Auto merge of #117756 - a1phyr:hashmap_fold, r=the8472 2024-01-20 17:53:26 +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 remove redundant imports 2023-12-10 10:56:22 +08: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 remove redundant imports 2023-12-10 10:56:22 +08: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 Add the wasm32-wasi-preview2 target 2024-01-23 13:26:16 +01: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 correct std::prelude comment 2023-04-27 15:56:57 +02:00
process Rollup merge of #114379 - RalfJung:command-removed-env-vars, r=m-ou-se 2023-09-22 12:15:25 +02:00
sync std: Doc blocking behavior of LazyLock methods 2024-01-14 10:28:13 -08:00
sys Rollup merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-se 2024-01-24 15:43:12 +01:00
sys_common std: once: use queue implementation on Xous 2024-01-13 09:13:56 -08:00
thread Revert example change from PR 116392 2024-01-20 18:39:48 -08: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 Rollup merge of #118798 - GnomedDev:use-atomicu8-backtrace, r=Nilstrieb 2024-01-19 08:15:02 +01:00
env.rs Reformulate std::env::{set,remove}_env as safety note 2023-12-13 12:49:38 +01:00
error.rs Clean dead codes 2023-11-26 09:25:07 +08:00
f32.rs Stabilize round_ties_even 2024-01-19 18:05:53 -05:00
f64.rs Stabilize round_ties_even 2024-01-19 18:05:53 -05:00
fs.rs Rollup merge of #119319 - chfogelman:buffered-file-doc, r=the8472 2024-01-03 16:08:25 +01:00
keyword_docs.rs docs: Add example, reference link for type keyword. 2023-08-21 20:00:43 +07:00
lib.rs Auto merge of #119892 - joboet:libs_use_assert_unchecked, r=Nilstrieb,cuviper 2024-01-23 06:45:58 +00:00
macros.rs added column number to dbg!() 2023-12-12 18:12:23 +08:00
num.rs removed nonfunctioning benchmark 2024-01-11 11:30:12 -05:00
panic.rs merge core_panic feature into panic_internals 2023-12-09 14:49:00 +01:00
panicking.rs Update test for E0796 and static_mut_ref lint 2024-01-07 17:29:25 +03:00
path.rs fix(std): Rename os_str_bytes to encoded_bytes 2023-09-01 19:33:16 -05:00
process.rs Cfg remove lang items in doctest 2023-12-15 16:17:28 +00: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