@@ -481,6 +481,45 @@ default toolchain:
481
481
rustup default system
482
482
```
483
483
484
+ ## Working with components
485
+
486
+ Components that enhance your default Rust toolchain, like ` rustfmt ` , can be
487
+ installed like so:
488
+
489
+ ```
490
+ rustup component add rustfmt
491
+ ```
492
+
493
+ This will install ` rustfmt ` for the toolchain you have selected as your default
494
+ using the ` rustup toolchain default <toolchain> ` command. If you want to see a list of the
495
+ components that are available for your default toolchain, you can use:
496
+
497
+ ```
498
+ rustup component list --filter available
499
+ ```
500
+
501
+ This will list only the components that are available, without listing the
502
+ components you have installed, or the ones that are required for your installed
503
+ toolchain. If you want to filter by those particular statuses, the filter
504
+ argument would look like:
505
+
506
+ ```
507
+ rustup component list --filter required
508
+ ```
509
+
510
+ or
511
+
512
+ ```
513
+ rustup component list --filter installed
514
+ ```
515
+
516
+ Required components are components that are required for you to compile Rust
517
+ projects using the toolchain you have selected as your default. These are
518
+ components like ` rust-std ` , ` rust-doc ` , ` rustc ` , and ` cargo ` . Installed
519
+ components include required components, and are all components that you have
520
+ installed. This includes non-critical components like ` rustfmt ` or ` clippy ` ,
521
+ which you may have installed previously.
522
+
484
523
## Working with custom toolchains and local builds
485
524
486
525
For convenience of developers working on Rust itself, ` rustup ` can manage
@@ -530,9 +569,9 @@ If you need a more complex setup, rustup supports the convention used by
530
569
the __ curl__ program, documented in the ENVIRONMENT section of
531
570
[ its manual page] [ curlman ] .
532
571
533
- Note that some versions of ` libcurl ` apparently require you to drop the
534
- ` http:// ` or ` https:// ` prefix in environment variables. For example,
535
- ` export http_proxy=proxy.example.com:1080 ` (and likewise for HTTPS).
572
+ Note that some versions of ` libcurl ` apparently require you to drop the
573
+ ` http:// ` or ` https:// ` prefix in environment variables. For example,
574
+ ` export http_proxy=proxy.example.com:1080 ` (and likewise for HTTPS).
536
575
If you are getting an SSL ` unknown protocol ` error from ` rustup ` via ` libcurl `
537
576
but the command-line ` curl ` command works fine, this may be the problem.
538
577
0 commit comments