Rustup: Difference between toolchain and target

I just noticed that rustup can install toolchains and targets completely separate of each other. For example here I have installed three targets but only one toolchain:

$ rustup target list
wasm32-wasi (installed)
x86_64-pc-windows-gnu (installed)
x86_64-pc-windows-msvc (installed)

$ rustup toolchain list
nightly-x86_64-pc-windows-gnu (default)

What components/functionalities/files are part of the target and which are part of the toolchain?

The toolchain is made up of all the parts that run on your current host: cargo, rustc, etc.

The target has the parts needed to compile for a specific target environment, which may be different than the host. This is primarily the compiled standard library, but may also include additional runtime objects needed to link executables for that target.

1 Like

Oh, so the toolchain is completely host-specific, I see.

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.