Skip to content

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

Open
@AaronFriel

Description

@AaronFriel

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"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions