You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error message for rustup target add invalid-target #3318
; rustup target add wasm
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rust-std' for target 'wasm'
note: not all platforms have the standard library pre-compiled: https://doc.rust-lang.org/nightly/rustc/platform-support.html
help: consider using `cargo build -Z build-std` instead
The pointer to platform-support.html is good and helpful, but the rest of these messages are a bit misleading. The problem is that wasm isn't a target, I need to pick a specific version of wasm:
Have rustup check the output of rustc --print=target-list for the specified toolchain and give a more helpful error if it doesn't have the target. Maybe something like this:
; rustup target add wasm
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not support target 'wasm'
note: you can see a list of supported targets with `rustc --print=target-list`
note: if you are adding support for a new target to rustc itself, see https://rustc-dev-guide.rust-lang.org/building/new-target.html
Activity
0xPoe commentedon May 7, 2023
I will try to improve it.