-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rename wasm32-wasi
to wasm32-wasi-preview1
#110596
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Marking as waiting on author, given the WIP state; feel free to ping me/change labels when ready. |
81f2641
to
a5af9d1
Compare
This comment has been minimized.
This comment has been minimized.
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
These commits modify compiler targets. The Miri subtree was changed cc @rust-lang/miri |
This compiles locally now, and CI seems to be passing! @WaffleLapkin can I ask you to maybe take a look now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the MCP mentioned the period where the old name would be accepted with the new name, but it looks like this PR just renames the target, without handling the old name in any way, why so?
Additionally I've found a few mentions of wasm32-wasi
in the repo, that were not changed:
library/stdarch/ci/docker/wasm32-wasi/Dockerfile
15: --mapdir .::/checkout/target/wasm32-wasi/release/deps
src/stage0.json
224: "dist/2023-03-07/rust-std-beta-wasm32-wasi.tar.gz": "265fa8b315a5d39a35fb8d32d5e46c3c66f9608992a3d708ac90437818cfed45",
225: "dist/2023-03-07/rust-std-beta-wasm32-wasi.tar.xz": "26839f3ed020dbda8ba893492cf504d565e7e1af7cfec5ad76053443d1022839",
src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md
221:and your cross-compilation target is `wasm32-wasi`, you can build with:
224:./x.py build --target x86_64-unknown-linux-gnu --target wasm32-wasi
236:target = ["x86_64-unknown-linux-gnu", "wasm32-wasi"]
257:cargo +stage1 build --target wasm32-wasi
Can you clarify why these are not/should not be changed?
@WaffleLapkin This is something we explicitly decided not to do. I think perhaps you might be confusing it with both Preview 1 and Preview 2 existing in the compiler for the foreseeable future? That was in the Preview 2 MCP. Relevant text from the Preview 1 rename MCP:
Oops! Thank you for spotting that! - The first and third one are reason other than I don't remember it showing up when I grepped the codebase. The second one seems to be describing some sort of mapping of hashes and targets though. I actually don't know what that is, or how I should update that? Do I just rename the target, and will the hash remain the same? |
I asked the bootstrap team, and they told me not to touch |
Okay, I've tracked down the other two missing renames of I'll file separate patches to both those repos. And I think with that all feedback from review has been handled. edit: filed the PRs and linked them in the list. |
wasm32-wasi
target to wasm32-wasi-preview1
wasm32-wasi
to wasm32-wasi-preview1
Yeah, oops. I totally missed the "not" there 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with the last nitpick fixed
@WaffleLapkin thanks for catching that; fixed! I think that means this can now be merged 😊 |
I understand correct, this renames |
@yoshuawuyts Can you write a blog for the Rust blog announcing this change? It would be great if we can coordinate those together with this. |
⌛ Trying commit 734c8c9 with merge 14b728e7b91e4d13222d1fec97b0ed7ae14041dc... |
(it's still marked as "trying" in the bors queue even after @workingjubilee closed and reopened. Trying again...) |
Wait... now it's "pending" not "pending (try)" @bors r- |
@bors try |
⌛ Trying commit 734c8c9 with merge e1e8b3f26b4661e6bcda6a18408e8fc8b5ed2d8a... |
☀️ Try build successful - checks-actions |
Hi @Mark-Simulacrum, we've gotten the try build sorted out and completed. Could you kick off a dev-static release again? Thanks! |
@@ -306,7 +306,7 @@ fn copy_self_contained_objects( | |||
.unwrap_or_else(|| { | |||
panic!("Target {:?} does not have a \"wasi-root\" key", target.triple) | |||
}) | |||
.join("lib/wasm32-wasi"); | |||
.join("lib/wasm32-wasi-preview1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it able to find wasi-libc sysroot? My understanding wasi-libc targets doesn't mention -preview1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to compile a simple file with rustc +stage1 -v --target=wasm32-wasi-preview1 main2.rs
fn main() {
println!("hi");
}
And it failed with
= note: rust-lld: error: cannot open crt1-command.o: No such file or directory
rust-lld: error: unable to find library -lc
Also I ran the tests the same way I did here #112922 (comment)
and many more tests(almost 4k) failed due to the same error that I showed above.
Without this change I'm able to compile the same file to wasm32-wasi
and only 191 test fails without this change instead of 4007 with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I might be doing something wrong though, but could you try to run it yourself please @yoshuawuyts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried to fix it by removing -preview1
from here, but it doesn't fix the problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried to fix it by removing -preview1 from here, but it doesn't fix the problem
You most likely have to revert the other change in the same file (line 411) as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I did, stiil the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, several lines above it should check for containing wasi instead of ending with it. I will send a patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I don't have permissions to update your branch @yoshuawuyts , here's the fix + merge master branch and resolving of conflicts https://github.com/rust-lang/rust/compare/master...g0djan:rust:rename-wasm32-wasi?expand=1
I also reran ui tests and now your pr doesn't break or fix any tests compared to running tests without your pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've spoken to the maintainers of wasi-libc, and they indeed haven't updated the target yet to include the -preview1
suffix. This is coming down the pipeline at some point in the near future, but hasn't happened yet.
So thank you for catching and fixing this; we indeed should land this change!
Apologies for the delay, I've kicked off dev-static nightly for e1e8b3f26b4661e6bcda6a18408e8fc8b5ed2d8a now. |
There's a wasi-libc PR up for renaming I don't think it touches the |
@yoshuawuyts what's the update on this? |
I've opened a new MCP with a slightly amended plan to the current tracking issue which is intended to help smooth the transition here and avoiding the need to update Rustup/Cargo with knowledge of this rename. If/when that is accepted I plan on helping out here to move this PR forward. |
I've opted to (read, my memory is so bad I forgot about this, again) make a "fresh" version of this at #120468 to implement the first step of the transition plan in rust-lang/compiler-team#695 |
Closing this in favor of #120468 |
Implements rust-lang/compiler-team#607