Rust toolchain
A declarative managing the Rust toolchain
| Type | object |
|---|---|
| File match |
rust-toolchain.toml
|
| Schema URL | https://catalog.lintel.tools/schemas/rust/rust-toolchain/latest.json |
| Source | https://www.schemastore.org/rust-toolchain.json |
Validate with Lintel
npx @lintel/lintel check
Properties
A toolchain is a complete installation of the Rust compiler (rustc) and related tools (like cargo). A toolchain specification includes the release channel or version, and the host platform that the toolchain runs on.
Get more from Toolchains
5 nested properties
channel is a named release channel, a major and minor version number such as 1.42, or a fully specified version number, such as 1.42.0. Channel names can be optionally appended with an archive date, as in nightly-2014-12-18, in which case the toolchain is downloaded from the archive for that date. Get more from Toolchain specification.
Other valid channel like stable,1.63,1.63.0,nightly-2022-09-20,stable-x86_64-pc-windows-msvc,1.63.0-riscv64gc-unknown-linux-gnu,nightly-2022-09-20-x86_64-unknown-nux-gnu
Each release of Rust includes several "components", some of
which are required (like rustc) and some that are optional (like clippy)
Learn more from Components
rustc is capable of generating code for many platforms. The target specifies the platform that the code will be generated for. By default, cargo and rustc use the host toolchain's platform as the target. To build for a different target, usually the target's standard library needs to be installed first via the rustup target command. Or you can run rustc --print target-list to list "built-in" targets
Get more from Platform Support and Targets
Profiles are groups of components you can choose to download while installing a new Rust toolchain.
The profiles available at this time are minimal, default, and complete.
Path to a custom local toolchain. Since a path directive directly names a local toolchain, other options
like components, targets, and profile have no effect. channel
and path are mutually exclusive, since a path already points to a
specific toolchain. A relative path is resolved relative to the
location of the rust-toolchain.toml file.
Learn more from Custom toolchains