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

Move Rust templates to wasm32-wasip1 #2925

Closed
itowlson opened this issue Nov 13, 2024 · 0 comments · Fixed by #2927
Closed

Move Rust templates to wasm32-wasip1 #2925

itowlson opened this issue Nov 13, 2024 · 0 comments · Fixed by #2927

Comments

@itowlson
Copy link
Contributor

The Rust project has started the process of deprecating the wasm32-wasi target in favour of wasm32-wasip1. (There is also a wasm32-wasip2 but that isn't as mature I believe.) The new target was introduced in Rust 1.78. As of Rust 1.81, wasm32-wasi emits a deprecation notice; the target is slated to be removed in 1.84 (Jan 2025).

We therefore want to switch our Rust templates over to wasm32-wasip1, but to provide the least worst experience to users who have seen no reason to upgrade their perfectly good installation of Rust 1.73.

A possible way to do this is, at the same time we switch the template targets over, to add a MSRV of 1.78 to the templates' Cargo.toml files. This should ensure that people on older versions get guided to bump their Rust versions. However, I don't think upgrading to Rust 1.78 inherently installs the new target. So a user who just upgraded Rust would still get an error on the new target:

error[E0463]: can't find crate for `core`
  |
  = note: the `wasm32-wasip1` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-wasip1`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `futures-core` (lib) due to 1 previous error

This isn't very lovely, but it does include the necessary guidance.

So I suggest that in time for the next minor release we:

  • Bump Rust templates to wasm32-wasip1
  • Bump Rust templates MSRV to 1.78
  • Add docs calling out the name change and specifically including the error message

Are folks okay with this? Better ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant