'rustc' component, is not applicable


I had followed this video and I did not see errors.

Rust Setup for Windows - Doug Milford - https://www.youtube.com/watch?v=f6tizikEMTk

Installed and tried the command: rustc --version

error: the 'rustc.exe' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-msvc' toolchain

Help would be very much apriciated.


That looks like a broken installation. It shouldn't happen. File a bug? https://github.com/rust-lang/rustup

Theoretically this could fix lack of the rustc component:

rustup component add rustc
rustup default stable

but it's very weird that it's missing in the first place.

1 Like


C:\Users\FMS>rustup component add rustc
info: component 'rustc' for target 'x86_64-pc-windows-msvc' is up to date

C:\Users\FMS>rustup default stable
info: using existing install for 'stable-x86_64-pc-windows-msvc'
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'

stable-x86_64-pc-windows-msvc unchanged - (rustc does not exist)

rustup self uninstall

and try installing it again from https://rustup.rs/ :frowning:

Thanks a lot. Seems that I got past these errors

Now I'm trying Hello World and got this result and at 4:50

D:\Tools\Rust\Hello World>cargo run
error: failed to parse manifest at D:\Tools\Rust\Hello World\Cargo.toml

Caused by:
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

D:\Tools\Rust\Hello World>

Are you sure that your file is called main.rs and that it resides in a src subfolder next to your Cargo.toml?
Usually you would not create these files manually like shown in this video but call cargo new hello_world instead, which creates a hello_world/Cargo.toml and hello_world/src/main.rs for you. hello_world can of course be changed to whatever you like.

Seems like your folder is called scr instead of src.

1 Like


I have a strange kind of dyslexia that randomly blinds me. :o)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.