rustup icon indicating copy to clipboard operation
rustup copied to clipboard

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

Open AaronFriel opened this issue 1 year ago • 1 comments

Verification

  • [X] I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue+is%3Aopen%2Cclosed and found no duplicates.
  • [X] 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.

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 avatar Aug 27 '24 07:08 AaronFriel