rust/compiler
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
..
rustc
rustc_abi fix some references to no-longer-existing ReprOptions.layout_seed 2024-02-26 10:40:48 +01:00
rustc_arena rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
rustc_ast Add ErrorGuaranteed to ast::ExprKind::Err 2024-02-25 22:24:31 +01:00
rustc_ast_lowering Refactor LoweringContext::get_delegation_sig_id. 2024-02-27 16:09:20 +11:00
rustc_ast_passes Remove an unchecked_error_guaranteed call. 2024-02-21 17:02:30 +11:00
rustc_ast_pretty Add ErrorGuaranteed to ast::ExprKind::Err 2024-02-25 22:24:31 +01:00
rustc_attr
rustc_baked_icu_data
rustc_borrowck Avoid a span_delayed_bug in compute_regions. 2024-02-27 16:40:13 +11:00
rustc_builtin_macros Remove ast:: & base:: prefixes from some builtin macros 2024-02-25 22:25:26 +01:00
rustc_codegen_cranelift Auto merge of #121635 - 823984418:remove_archive_builder_lifetime_a, r=nnethercote 2024-02-27 03:27:48 +00:00
rustc_codegen_gcc Auto merge of #121635 - 823984418:remove_archive_builder_lifetime_a, r=nnethercote 2024-02-27 03:27:48 +00:00
rustc_codegen_llvm Auto merge of #121635 - 823984418:remove_archive_builder_lifetime_a, r=nnethercote 2024-02-27 03:27:48 +00:00
rustc_codegen_ssa Auto merge of #121635 - 823984418:remove_archive_builder_lifetime_a, r=nnethercote 2024-02-27 03:27:48 +00:00
rustc_const_eval Auto merge of #121549 - matthiaskrgr:rollup-1hvu3lb, r=matthiaskrgr 2024-02-24 21:08:39 +00:00
rustc_data_structures compiler: use addr_of! 2024-02-24 18:53:48 +03:00
rustc_driver
rustc_driver_impl Inline and remove abort_on_err. 2024-02-22 08:03:47 +11:00
rustc_error_codes remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00
rustc_error_messages
rustc_errors compiler: clippy::complexity fixes 2024-02-23 19:56:35 +01:00
rustc_expand Add ErrorGuaranteed to ast::ExprKind::Err 2024-02-25 22:24:31 +01:00
rustc_feature Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk 2024-02-26 22:24:16 +00:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Don't ICE on anonymous struct in enum variant 2024-02-23 12:25:23 +00:00
rustc_hir_analysis Auto merge of #121285 - nnethercote:delayed_bug-audit, r=lcnr 2024-02-27 11:03:07 +00:00
rustc_hir_pretty
rustc_hir_typeck Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk 2024-02-26 22:24:16 +00:00
rustc_incremental Adjust the has_errors* methods. 2024-02-22 08:03:47 +11:00
rustc_index
rustc_index_macros
rustc_infer Avoid a span_delayed_bug in TypeErrCtxt::report_region_errors. 2024-02-27 16:40:11 +11:00
rustc_interface Rollup merge of #121392 - bjorn3:unify_dylib_loading, r=petrochenkov 2024-02-21 22:48:59 +01:00
rustc_lexer
rustc_lint Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk 2024-02-26 22:24:16 +00:00
rustc_lint_defs make non-PartialEq-typed consts as patterns a hard error 2024-02-25 11:30:10 +01:00
rustc_llvm Rollup merge of #121389 - klensy:llvm-warn-fix, r=nikic 2024-02-26 16:06:02 +01:00
rustc_log
rustc_macros Auto merge of #120393 - Urgau:rfc3373-non-local-defs, r=WaffleLapkin 2024-02-25 19:11:06 +00:00
rustc_metadata remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00
rustc_middle Auto merge of #121285 - nnethercote:delayed_bug-audit, r=lcnr 2024-02-27 11:03:07 +00:00
rustc_mir_build make non-PartialEq-typed consts as patterns a hard error 2024-02-25 11:30:10 +01:00
rustc_mir_dataflow
rustc_mir_transform ffi_unwind_calls: treat RustIntrinsic like regular Rust calls 2024-02-27 12:28:25 +01:00
rustc_monomorphize Reduce capabilities of Diagnostic. 2024-02-20 13:22:17 +11:00
rustc_next_trait_solver always emit AliasRelate goals when relating aliases 2024-02-26 10:17:43 +01:00
rustc_parse Auto merge of #121285 - nnethercote:delayed_bug-audit, r=lcnr 2024-02-27 11:03:07 +00:00
rustc_parse_format remove a couple of redundant clones 2024-02-17 12:46:18 +01:00
rustc_passes Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk 2024-02-26 22:24:16 +00:00
rustc_pattern_analysis Rollup merge of #121324 - Nadrieril:unspecialize, r=cjgillot 2024-02-25 17:05:21 +01:00
rustc_privacy Allow for a missing adt_def in NamePrivacyVisitor. 2024-02-23 10:57:11 +11:00
rustc_query_impl
rustc_query_system Rollup merge of #121401 - eltociear:patch-25, r=nnethercote 2024-02-22 18:09:54 +01:00
rustc_resolve Remove an unnecessary span_delayed_bug in Resolver::valid_res_from_ribs. 2024-02-27 16:31:40 +11:00
rustc_serialize
rustc_session compiler: clippy::complexity fixes 2024-02-23 19:56:35 +01:00
rustc_smir remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00
rustc_span Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
rustc_symbol_mangling
rustc_target Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
rustc_trait_selection Rollup merge of #121617 - compiler-errors:async-closure-kind-check, r=oli-obk 2024-02-26 16:06:04 +01:00
rustc_traits Rename some normalization-related items 2024-02-20 17:30:49 +01:00
rustc_transmute
rustc_ty_utils remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00
rustc_type_ir overflow errors: change source to a concrete enum 2024-02-22 17:43:57 +01:00
stable_mir remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00