Skip to content

Commit 6b0f44f

Browse files
authored
Merge pull request #2325 from kinnison/fix-2227
README: Describe how to install nightly with a component easily
2 parents a137aef + 4a450e3 commit 6b0f44f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ And it runs on all platforms Rust supports, including Windows.
4141

4242
## Installation
4343

44-
Follow the instructions at https://rustup.rs. If
44+
Follow the instructions at <https://www.rust-lang.org/tools/install>. If
4545
that doesn't work for you there are [other installation
4646
methods](#other-installation-methods).
4747

@@ -151,6 +151,26 @@ using the toolchain.
151151
[Environment Variables]: #environment-variables
152152
[cargo]: https://github.com/rust-lang/cargo
153153

154+
#### Installing nightly
155+
156+
When `rustup-init` installs the initial toolchain it _forces_ the installation
157+
and so will install the `nightly` channel regardless of whether it might be
158+
missing components that you want. For example, if you want to make a fresh
159+
installation of `rustup` and then install `nightly` along with `clippy` or
160+
`miri` you will need to do this in two phases.
161+
162+
Firstly install `rustup` by means of:
163+
164+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- --default-toolchain none -y
165+
166+
Next you can install `nightly` allowing `rustup` to downgrade until it finds
167+
the components you need:
168+
169+
rustup toolchain install nightly --allow-downgrade --profile minimal --component clippy
170+
171+
This can be used to great effect in CI, to get you a toolchain rapidly which meets
172+
your criteria
173+
154174
## How rustup works
155175

156176
`rustup` is a *toolchain multiplexer*. It installs and manages many

0 commit comments

Comments
 (0)