Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about profiles #2072

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ And it runs on all platforms Rust supports, including Windows.
[rustlang]: https://www.rust-lang.org

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

### Profiles

`rustup` has the concept of "profiles". They 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`:

* The **minimal** profile includes as few components as possible to get a
working compiler (`rustc`, `rust-std`, and `cargo`). It's recommended to use
this component on Windows systems if you don't use local documentation, and in
CI.
* The **default** profile includes all the components previously installed by
default (`rustc`, `rust-std`, `cargo`, and `rust-docs`) plus `rustfmt` and
`clippy`. This profile will be used by `rustup` by default, and it's the one
recommended for general use.
* The **complete** profile includes all the components available through
`rustup`, including `miri` and IDE integration tools (`rls` and `rust-analysis`).

To change the `rustup` profile you can use the `rustup set profile` command. For
example, to select the minimal profile you can use:

```
rustup set profile minimal
```

It's also possible to choose the profile when installing `rustup` for the first
time, either interactively by choosing the "Customize installation" option or
programmaticaly by passing the `--profile=<name>` flag. Profiles will only
affect newly installed toolchains: as usual it will be possible to install
individual components later with: `rustup component add`.

#### Enable tab completion for Bash, Fish, Zsh, or PowerShell

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

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