Skip to content

Commit a5eda4b

Browse files
authored
Merge pull request #2072 from woshilapin/profile-documentation
Add documentation about profiles
2 parents 47961af + a3ad8db commit a5eda4b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ And it runs on all platforms Rust supports, including Windows.
1414
[rustlang]: https://www.rust-lang.org
1515

1616
* [Installation](#installation)
17+
* [Profiles](#profiles)
18+
* [Shell autocompletion](#enable-tab-completion-for-bash-fish-zsh-or-powershell)
19+
* [Where to install?](#choosing-where-to-install)
1720
* [How rustup works](#how-rustup-works)
1821
* [Keeping Rust up to date](#keeping-rust-up-to-date)
1922
* [Working with nightly Rust](#working-with-nightly-rust)
@@ -59,6 +62,36 @@ you are ready to Rust. If you decide Rust isn't your thing, you can
5962
completely remove it from your system by running `rustup self
6063
uninstall`.
6164

65+
### Profiles
66+
67+
`rustup` has the concept of "profiles". They are groups of components you can
68+
choose to download while installing a new Rust toolchain. The profiles
69+
available at this time are `minimal`, `default`, and `complete`:
70+
71+
* The **minimal** profile includes as few components as possible to get a
72+
working compiler (`rustc`, `rust-std`, and `cargo`). It's recommended to use
73+
this component on Windows systems if you don't use local documentation, and in
74+
CI.
75+
* The **default** profile includes all the components previously installed by
76+
default (`rustc`, `rust-std`, `cargo`, and `rust-docs`) plus `rustfmt` and
77+
`clippy`. This profile will be used by `rustup` by default, and it's the one
78+
recommended for general use.
79+
* The **complete** profile includes all the components available through
80+
`rustup`, including `miri` and IDE integration tools (`rls` and `rust-analysis`).
81+
82+
To change the `rustup` profile you can use the `rustup set profile` command. For
83+
example, to select the minimal profile you can use:
84+
85+
```
86+
rustup set profile minimal
87+
```
88+
89+
It's also possible to choose the profile when installing `rustup` for the first
90+
time, either interactively by choosing the "Customize installation" option or
91+
programmaticaly by passing the `--profile=<name>` flag. Profiles will only
92+
affect newly installed toolchains: as usual it will be possible to install
93+
individual components later with: `rustup component add`.
94+
6295
#### Enable tab completion for Bash, Fish, Zsh, or PowerShell
6396

6497
`rustup` now supports generating completion scripts for Bash, Fish,
@@ -585,6 +618,7 @@ but the command-line `curl` command works fine, this may be the problem.
585618
Command | Description
586619
----------------------------------------------------------- | ------------------------------------------------------------
587620
`rustup default nightly` | Set the default toolchain to the latest nightly
621+
`rustup set profile minimal` | Set the default "profile" (see [profiles](#profiles))
588622
`rustup target list` | List all available targets for the active toolchain
589623
`rustup target add arm-linux-androideabi` | Install the Android target
590624
`rustup target remove arm-linux-androideabi` | Remove the Android target
@@ -668,6 +702,7 @@ $ curl https://sh.rustup.rs -sSf | sh -s -- --help
668702
$ curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path
669703
$ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
670704
$ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none
705+
$ curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain nightly
671706
```
672707

673708
If you prefer you can directly download `rustup-init` for the

0 commit comments

Comments
 (0)