Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7303555

Browse files
authoredNov 5, 2024
Rollup merge of rust-lang#132562 - alexcrichton:remove-wasm32-wasi, r=jieyouxu
Remove the `wasm32-wasi` target from rustc This commit is the final step in the journey of renaming the historical `wasm32-wasi` target in the Rust compiler to `wasm32-wasip1`. Various steps in this journey so far have been: * 2023-04-03: rust-lang/compiler-team#607 - initial proposal for this rename * 2024-11-27: rust-lang/compiler-team#695 - amended schedule/procedure for rename * 2024-01-29: rust-lang#120468 - initial introduction of `wasm32-wasip1` * 2024-06-18: rust-lang#126662 - warn on usage of `wasm32-wasi` * 2024-11-08: this PR - remove the `wasm32-wasi` target The full transition schedule is in [this comment][comment] and is summarized with: * 2024-05-02: Rust 1.78 released with `wasm32-wasip1` target * 2024-09-05: Rust 1.81 released warning on usage of `wasm32-wasi` * 2025-01-09: Rust 1.84 to be released without the `wasm32-wasi` target This means that support on stable for the replacement target of `wasm32-wasip1` has currently been available for 6 months. Users have already seen warnings on stable for 2 months about usage of `wasm32-wasi` and stable users have another 2 months of warnings before the target is removed from stable. This commit is intended to be the final step in this transition so the source tree should no longer mention `wasm32-wasi` except in historical reference to the older name of the `wasm32-wasip1` target. [comment]: rust-lang#120468 (comment)
2 parents 088e698 + c049cc1 commit 7303555

File tree

13 files changed

+9
-48
lines changed

13 files changed

+9
-48
lines changed
 

‎compiler/rustc_session/src/config.rs

-13
Original file line numberDiff line numberDiff line change
@@ -1350,19 +1350,6 @@ pub fn build_target_config(early_dcx: &EarlyDiagCtxt, opts: &Options, sysroot: &
13501350
early_dcx.early_warn(warning)
13511351
}
13521352

1353-
// The `wasm32-wasi` target is being renamed to `wasm32-wasip1` as
1354-
// part of rust-lang/compiler-team#607 and
1355-
// rust-lang/compiler-team#695. Warn unconditionally on usage to
1356-
// raise awareness of the renaming. This code will be deleted in
1357-
// October 2024.
1358-
if opts.target_triple.tuple() == "wasm32-wasi" {
1359-
early_dcx.early_warn(
1360-
"the `wasm32-wasi` target is being renamed to \
1361-
`wasm32-wasip1` and the `wasm32-wasi` target will be \
1362-
removed from nightly in October 2024 and removed from \
1363-
stable Rust in January 2025",
1364-
)
1365-
}
13661353
if !matches!(target.pointer_width, 16 | 32 | 64) {
13671354
early_dcx.early_fatal(format!(
13681355
"target specification was invalid: unrecognized target-pointer-width {}",

‎compiler/rustc_target/src/spec/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,6 @@ supported_targets! {
18051805
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
18061806
("wasm32-unknown-unknown", wasm32_unknown_unknown),
18071807
("wasm32v1-none", wasm32v1_none),
1808-
("wasm32-wasi", wasm32_wasi),
18091808
("wasm32-wasip1", wasm32_wasip1),
18101809
("wasm32-wasip2", wasm32_wasip2),
18111810
("wasm32-wasip1-threads", wasm32_wasip1_threads),

‎compiler/rustc_target/src/spec/targets/wasm32_wasi.rs

-11
This file was deleted.

‎compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub(crate) fn target() -> Target {
1717

1818
options.os = "wasi".into();
1919
options.env = "p1".into();
20-
options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasi"]);
20+
options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasip1"]);
2121

2222
options.pre_link_objects_self_contained = crt_objects::pre_wasi_self_contained();
2323
options.post_link_objects_self_contained = crt_objects::post_wasi_self_contained();
@@ -47,7 +47,7 @@ pub(crate) fn target() -> Target {
4747
options.entry_name = "__main_void".into();
4848

4949
Target {
50-
llvm_target: "wasm32-wasi".into(),
50+
llvm_target: "wasm32-wasip1".into(),
5151
metadata: crate::spec::TargetMetadata {
5252
description: Some("WebAssembly with WASI".into()),
5353
tier: Some(2),

‎compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! The `wasm32-wasip2` target is the next evolution of the
2-
//! wasm32-wasi target. While the wasi specification is still under
2+
//! wasm32-wasip1 target. While the wasi specification is still under
33
//! active development, the preview 2 iteration is considered an "island
44
//! of stability" that should allow users to rely on it indefinitely.
55
//!

‎src/ci/docker/host-x86_64/dist-various-2/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_FUCHSIA_RUSTFLAGS \
114114
ENV TARGETS=x86_64-unknown-fuchsia
115115
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
116116
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
117-
ENV TARGETS=$TARGETS,wasm32-wasi
118117
ENV TARGETS=$TARGETS,wasm32-wasip1
119118
ENV TARGETS=$TARGETS,wasm32-wasip1-threads
120119
ENV TARGETS=$TARGETS,wasm32-wasip2

‎src/doc/rustc/src/platform-support.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ target | std | notes
192192
[`thumbv8m.main-none-eabihf`](platform-support/thumbv8m.main-none-eabi.md) | * | Bare Armv8-M Mainline, hardfloat
193193
[`wasm32-unknown-emscripten`](platform-support/wasm32-unknown-emscripten.md) | ✓ | WebAssembly via Emscripten
194194
[`wasm32-unknown-unknown`](platform-support/wasm32-unknown-unknown.md) | ✓ | WebAssembly
195-
`wasm32-wasi` | ✓ | WebAssembly with WASI (undergoing a [rename to `wasm32-wasip1`][wasi-rename])
196-
[`wasm32-wasip1`](platform-support/wasm32-wasip1.md) | ✓ | WebAssembly with WASI
195+
[`wasm32-wasip1`](platform-support/wasm32-wasip1.md) | ✓ | WebAssembly with WASIp1
196+
[`wasm32-wasip2`](platform-support/wasm32-wasip2.md) | ✓ | WebAssembly with WASIp2
197197
[`wasm32-wasip1-threads`](platform-support/wasm32-wasip1-threads.md) | ✓ | WebAssembly with WASI Preview 1 and threads
198198
[`wasm32v1-none`](platform-support/wasm32v1-none.md) | * | WebAssembly limited to 1.0 features and no imports
199199
[`x86_64-apple-ios`](platform-support/apple-ios.md) | ✓ | 64-bit x86 iOS
@@ -377,7 +377,6 @@ target | std | host | notes
377377
`thumbv7a-pc-windows-msvc` | ✓ | |
378378
`thumbv7a-uwp-windows-msvc` | ✓ | |
379379
`thumbv7neon-unknown-linux-musleabihf` | ? | | Thumb2-mode Armv7-A Linux with NEON, musl 1.2.3
380-
[`wasm32-wasip2`](platform-support/wasm32-wasip2.md) | ✓ | | WebAssembly
381380
[`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? | | WebAssembly
382381
[`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ✓ | | x86 64-bit tvOS
383382
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator

‎src/doc/rustc/src/platform-support/wasm32-wasip1.md

-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ the target with:
9898
rustup target add wasm32-wasip1
9999
```
100100

101-
> **Note**: the `wasm32-wasip1` target is new and may only be available
102-
> on nightly by the time you're reading this. If `wasm32-wasip1` isn't
103-
> available on stable Rust then `wasm32-wasi` should be available instead.
104-
105101
Rust programs can be built for that target:
106102

107103
```text

‎src/doc/unstable-book/src/compiler-flags/wasm-c-abi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This option controls whether Rust uses the spec-compliant C ABI when compiling
44
for the `wasm32-unknown-unknown` target.
55

66
This makes it possible to be ABI-compatible with all other spec-compliant Wasm
7-
like Rusts `wasm32-wasi`.
7+
like Rusts `wasm32-wasip1`.
88

99
This compiler flag is perma-unstable, as it will be enabled by default in the
1010
future with no option to fall back to the old non-spec-compliant ABI.

‎src/tools/build-manifest/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ static TARGETS: &[&str] = &[
157157
"thumbv8m.main-none-eabihf",
158158
"wasm32-unknown-emscripten",
159159
"wasm32-unknown-unknown",
160-
"wasm32-wasi",
161160
"wasm32-wasip1",
162161
"wasm32-wasip1-threads",
163162
"wasm32-wasip2",

‎src/tools/compiletest/src/header/tests.rs

-4
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,6 @@ fn wasm_special() {
583583
("wasm32-unknown-emscripten", "emscripten", true),
584584
("wasm32-unknown-emscripten", "wasm32", true),
585585
("wasm32-unknown-emscripten", "wasm32-bare", false),
586-
("wasm32-wasi", "emscripten", false),
587-
("wasm32-wasi", "wasm32", true),
588-
("wasm32-wasi", "wasm32-bare", false),
589-
("wasm32-wasi", "wasi", true),
590586
("wasm32-wasip1", "emscripten", false),
591587
("wasm32-wasip1", "wasm32", true),
592588
("wasm32-wasip1", "wasm32-bare", false),

‎tests/assembly/targets/targets-elf.rs

-3
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,6 @@
525525
//@ revisions: wasm32v1_none
526526
//@ [wasm32v1_none] compile-flags: --target wasm32v1-none
527527
//@ [wasm32v1_none] needs-llvm-components: webassembly
528-
//@ revisions: wasm32_wasi
529-
//@ [wasm32_wasi] compile-flags: --target wasm32-wasi
530-
//@ [wasm32_wasi] needs-llvm-components: webassembly
531528
//@ revisions: wasm32_wasip1
532529
//@ [wasm32_wasip1] compile-flags: --target wasm32-wasip1
533530
//@ [wasm32_wasip1] needs-llvm-components: webassembly

‎tests/codegen/repr/transparent-opaque-ptr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//@ revisions: aarch64-linux aarch64-darwin wasm32-wasi
1+
//@ revisions: aarch64-linux aarch64-darwin wasm32-wasip1
22
//@ compile-flags: -O -C no-prepopulate-passes
33

44
//@[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu
55
//@[aarch64-linux] needs-llvm-components: aarch64
66
//@[aarch64-darwin] compile-flags: --target aarch64-apple-darwin
77
//@[aarch64-darwin] needs-llvm-components: aarch64
8-
//@[wasm32-wasi] compile-flags: --target wasm32-wasi
9-
//@[wasm32-wasi] needs-llvm-components: webassembly
8+
//@[wasm32-wasip1] compile-flags: --target wasm32-wasip1
9+
//@[wasm32-wasip1] needs-llvm-components: webassembly
1010

1111
// See ./transparent.rs
1212
// Some platforms pass large aggregates using immediate arrays in LLVMIR

0 commit comments

Comments
 (0)
Failed to load comments.