Skip to content

Commit

Permalink
Update README.md with information about rustup component commands a…
Browse files Browse the repository at this point in the history
…nd filters.
  • Loading branch information
Trevor Miranda committed Feb 5, 2019
1 parent 7f347f2 commit 1774cd3
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,45 @@ default toolchain:
rustup default system
```

## Working with components

Components that enhance your default Rust toolchain, like `rustfmt`, can be
installed like so:

```
rustup component add rustfmt
```

This will install `rustfmt` for the toolchain you have selected as your default
using the `rustup toolchain default <toolchain>` command. If you want to see a list of the
components that are available for your default toolchain, you can use:

```
rustup component list --filter available
```

This will list only the components that are available, without listing the
components you have installed, or the ones that are required for your installed
toolchain. If you want to filter by those particular statuses, the filter
argument would look like:

```
rustup component list --filter required
```

or

```
rustup component list --filter installed
```

Required components are components that are required for you to compile Rust
projects using the toolchain you have selected as your default. These are
components like `rust-std`, `rust-doc`, `rustc`, and `cargo`. Installed
components include required components, and are all components that you have
installed. This includes non-critical components like `rustfmt` or `clippy`,
which you may have installed previously.

## Working with custom toolchains and local builds

For convenience of developers working on Rust itself, `rustup` can manage
Expand Down Expand Up @@ -530,9 +569,9 @@ If you need a more complex setup, rustup supports the convention used by
the __curl__ program, documented in the ENVIRONMENT section of
[its manual page][curlman].

Note that some versions of `libcurl` apparently require you to drop the
`http://` or `https://` prefix in environment variables. For example,
`export http_proxy=proxy.example.com:1080` (and likewise for HTTPS).
Note that some versions of `libcurl` apparently require you to drop the
`http://` or `https://` prefix in environment variables. For example,
`export http_proxy=proxy.example.com:1080` (and likewise for HTTPS).
If you are getting an SSL `unknown protocol` error from `rustup` via `libcurl`
but the command-line `curl` command works fine, this may be the problem.

Expand Down

0 comments on commit 1774cd3

Please sign in to comment.