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

Improve tips when installing tier 3 targets such as wasm32-wasip2 #4006

Open
2 tasks done
AaronFriel opened this issue Aug 27, 2024 · 1 comment
Open
2 tasks done
Milestone

Comments

@AaronFriel
Copy link

AaronFriel commented Aug 27, 2024

Verification

Problem

Installing the wasm32-wasip2 target on stable fails consistently with a confusing error message.

Steps

The command and error is:

$ rustup target add wasm32-wasip2 --toolchain stable
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rust-std' for target 'wasm32-wasip2'; did you mean 'wasm32-wasip1'?
note: not all platforms have the standard library pre-compiled: https://doc.rust-lang.org/nightly/rustc/platform-support.html

There are a few inconsistencies:

  1. That link always goes to nightly, not stable documentation.
  2. Both nightly platform support and stable platform support pages show the same table for wasm32-wasip2 support: rust-std is supported.
  3. The Rustup component availability page "Rustup packages availability on ..." shows rust-std as an available component for wasm32-wasip2.

Possible Solution(s)

No response

Notes

No response

Rustup version

$ rustup --version
rustup 1.26.0 (1980-01-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.80.1 (3f5fd8dd4 2024-08-06)`

Installed toolchains

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/friel/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
beta-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-wasi
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.80.1 (3f5fd8dd4 2024-08-06)

OS version

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
@AaronFriel AaronFriel added the bug label Aug 27, 2024
@rust-lang rust-lang deleted a comment Aug 27, 2024
@rami3l
Copy link
Member

rami3l commented Aug 27, 2024

I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.

@AaronFriel Thanks for filing this issue! However, you'll need to make sure this is reproducible on Rustup v1.27.1 before ticking the box above.

So far, wasip2 is tier 3, so even if std is supported for this target, no precompiled artifact is currently available for it on the server, so you'll need to compile it yourself. Please refer to https://stackoverflow.com/a/67787259 to see how to do this on your machine.

Thus, I consider the link in the message above to be mostly correct.

On the other hand, given the current usage of platforms in the current workspace, we can add a special case of this message for tier 3 targets.

@rami3l rami3l added enhancement and removed bug labels Aug 30, 2024
@rami3l rami3l changed the title Error installing wasm32-wasip2 target Improve tips when installing tier 3 targets such as wasm32-wasip2 Aug 30, 2024
@rami3l rami3l added this to the 1.28.1 milestone Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants