@@ -113,23 +113,70 @@ that uses the new TOML encoding in the `rust-toolchain` file. You need to upgrad
113113The ` rust-toolchain.toml ` /` rust-toolchain ` files are suitable to check in to
114114source control.
115115
116- The toolchains named in these files have a more restricted form than ` rustup `
117- toolchains generally, and may only contain the names of the three release
118- channels, 'stable', 'beta', 'nightly', Rust version numbers, like '1.0.0', and
119- optionally an archive date, like 'nightly-2017-01-01'. They may not name
120- custom toolchains, nor host-specific toolchains. To use a custom local
121- toolchain, you can instead use a ` path ` toolchain:
116+ ### Toolchain file settings
122117
123- ``` toml
124- [toolchain ]
125- path = " /path/to/local/toolchain"
118+ #### channel
119+
120+ The ` channel ` setting specifies which [ toolchain] to use. The value is a
121+ string in the following form:
122+
123+ ```
124+ <channel>[-<date>]
125+
126+ <channel> = stable|beta|nightly|<major.minor.patch>
127+ <date> = YYYY-MM-DD
126128```
127129
130+ Note that this is a more restricted form than ` rustup ` toolchains
131+ generally, and cannot be used to specify custom toolchains or
132+ host-specific toolchains.
133+
134+ [ toolchain ] : concepts/toolchains.md
135+
136+ #### path
137+
138+ The ` path ` setting allows a custom toolchain to be used. The value is a
139+ path string. A relative path is resolved relative to the location of the
140+ ` rust-toolchain.toml ` file.
141+
128142Since a ` path ` directive directly names a local toolchain, other options
129- like ` components ` , ` targets ` , and ` profile ` have no effect. ` channel `
130- and ` path ` are mutually exclusive, since a ` path ` already points to a
131- specific toolchain. A relative ` path ` is resolved relative to the
132- location of the ` rust-toolchain.toml ` file.
143+ like ` components ` , ` targets ` , and ` profile ` have no effect.
144+
145+ ` channel ` and ` path ` are mutually exclusive, since a ` path ` already
146+ points to a specific toolchain.
147+
148+ #### profile
149+
150+ The ` profile ` setting names a group of components to be installed. The
151+ value is a string. The valid options are: ` minimal ` , ` default ` , and
152+ ` complete ` . See [ profiles] for details of each.
153+
154+ Note that if not specified, the ` default ` profile is not necessarily
155+ used, as a different default profile might have been set with `rustup
156+ set profile`.
157+
158+ [ profiles ] : concepts/profiles.md
159+
160+ #### components
161+
162+ The ` components ` setting contains a list of additional components to
163+ install. The value is a list of strings. See [ components] for a list of
164+ components. Note that different toolchains may have different components
165+ available.
166+
167+ The components listed here are additive with the current profile.
168+
169+ [ components ] : concepts/components.md
170+
171+ #### targets
172+
173+ The ` targets ` setting contains a list of platforms to install for
174+ [ cross-compilation] . The value is a list of strings.
175+
176+ The host platform is automatically included; the targets listed here are
177+ additive.
178+
179+ [ cross-compilation ] : https://rust-lang.github.io/rustup/cross-compilation.html
133180
134181## Default toolchain
135182
0 commit comments