Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the wasm32-wasi target from rustc #132562

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

alexcrichton
Copy link
Member

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:

The full transition schedule is in this 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.

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)
@rustbot
Copy link
Collaborator

rustbot commented Nov 3, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Nov 3, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 3, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

@@ -377,7 +377,6 @@ target | std | host | notes
`thumbv7a-pc-windows-msvc` | ✓ | |
`thumbv7a-uwp-windows-msvc` | ✓ | |
`thumbv7neon-unknown-linux-musleabihf` | ? | | Thumb2-mode Armv7-A Linux with NEON, musl 1.2.3
[`wasm32-wasip2`](platform-support/wasm32-wasip2.md) | ✓ | | WebAssembly
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit unrelated to this PR, but I figured while I was here that I could go ahead and update the wasm32-wasip2 target from tier 3 to tier 2 to accurately reflect its status.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 5, 2024

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned TaKO8Ki Nov 5, 2024
@jieyouxu jieyouxu added O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-wasi Operating system: Wasi, Webassembly System Interface labels Nov 5, 2024
@Noratrieb
Copy link
Member

This also changes the LLVM/LLD target of wasm32-wasip1 to wasm32-wasip1. Is that intended to be done in this PR?

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly fine to me, r=me if the answer to Nora's question of changing the llvm target string is "this is intentional".

@jieyouxu jieyouxu added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 5, 2024
@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 5, 2024
@alexcrichton
Copy link
Member Author

Ah yes sorry I forgot to call that out but it is indeed intentional. AFAIK it will have no practical change and it matches how wasm32-wasip2 works so it felt best to keep it consistent.

@bors: r=jieyouxu

@bors
Copy link
Contributor

bors commented Nov 5, 2024

📌 Commit c049cc1 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 6, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#131261 (Stabilize `UnsafeCell::from_mut`)
 - rust-lang#131405 (bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip)
 - rust-lang#132077 (Add a new `wide-arithmetic` feature for WebAssembly)
 - rust-lang#132562 (Remove the `wasm32-wasi` target from rustc)
 - rust-lang#132660 (Remove unused errs.rs file)

Failed merges:

 - rust-lang#131721 (Add new unstable feature `const_eq_ignore_ascii_case`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7303555 into rust-lang:master Nov 6, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 6, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 6, 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)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Nov 7, 2024
Since [1], the `wasm32-wasi` target is no longer supported (replaced by
`wasm32-wasip1` and `wasm32-wasip2`). This has made it into the latest
nightly, so remove it from our testing.

[1]: rust-lang/rust#132562
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Nov 7, 2024
Since [1], the `wasm32-wasi` target is no longer supported (replaced by
`wasm32-wasip1` and `wasm32-wasip2`). This has made it into the latest
nightly, so remove it from our testing.

[1]: rust-lang/rust#132562

(backport <rust-lang#4013>)
(cherry picked from commit a4d3ca8)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Nov 7, 2024
Since [1], the `wasm32-wasi` target is no longer supported (replaced by
`wasm32-wasip1` and `wasm32-wasip2`). This has made it into the latest
nightly, so remove it from our testing.

[1]: rust-lang/rust#132562

(backport <rust-lang#4013>)
(cherry picked from commit a4d3ca8)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Nov 7, 2024
Since [1], the `wasm32-wasi` target is no longer supported (replaced by
`wasm32-wasip1` and `wasm32-wasip2`). This has made it into the latest
nightly, so remove it from our testing.

[1]: rust-lang/rust#132562

(backport <rust-lang#4013>)
(cherry picked from commit a4d3ca8)
@sffc
Copy link

sffc commented Nov 8, 2024

Just a note here: our builds pin nightlies based on LLVM updates, since this impacts compatibility with Xcode and other tools in our pipeline that run LTO on our C++/Rust mixed binaries. We are currently limited to nightlies that support LLVM 17, which is the version in the current Xcode release.

It appears that LLVM 18 landed on Feb 13, 2024: eaff1af

Meanwhile, wasm32-wasip1 landed on Mar 4, 2024: d18480b

This means that there is no nightly version that currently supports both LLVM 17 and wasm32-wasip1. This is a pain point since it means we can't both support both the latest Rust Nightly and also support the latest Xcode.

@alexcrichton alexcrichton deleted the remove-wasm32-wasi branch November 9, 2024 00:52
@alexcrichton
Copy link
Member Author

@sffc is it possible to configure your CI to work around this? For example using a different compiler for wasm than for native?

@sffc
Copy link

sffc commented Nov 12, 2024

Yes it can be worked-around with CI configs, but that's exactly why it is a pain point.

It would have been easier if the transition period between wasm32-wasi and wasm32-wasip1 had been longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants