Skip to content

Commit 295df30

Browse files
committed
add post about rustup 1.20.0
1 parent 171512c commit 295df30

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

posts/2019-10-15-Rustup-1.20.0.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
layout: post
3+
title: "Announcing Rustup 1.20.0"
4+
author: The Rustup Working Group
5+
---
6+
7+
The rustup working group is happy to announce the release of rustup version 1.20.0. [Rustup][install] is the recommended tool to install [Rust][rust], a programming language that is empowering everyone to build reliable and efficient software.
8+
9+
If you have a previous version of rustup installed, getting rustup 1.20.0 is as easy as:
10+
11+
```
12+
rustup self update
13+
```
14+
15+
If you don't have it already, you can [get rustup][install] from the appropriate page on our website.
16+
17+
[rust]: https://www.rust-lang.org
18+
[install]: https://rustup.rs
19+
20+
## What's new in rustup 1.20.0
21+
22+
The highlights of this release are profiles support, the ability to get the latest available nightly with all the components you need, and improvements to the `rustup doc` command. You can also check out [the changelog][changelog] for a list of all the changes included in this release.
23+
24+
[changelog]: https://github.com/rust-lang/rustup.rs/blob/master/CHANGELOG.md
25+
26+
### Profiles
27+
28+
Previous versions of rustup installed a few components by default along with each toolchain: the compiler (`rustc`), the package manager (`cargo`), the standard library (`rust-std`), and offline documentation (`rust-docs`). While this approach is fine while developing software locally, some of the components (like `rust-docs`) slowed down the installation due to the large amount of installed files, especially on CIs and on Windows.
29+
30+
To address this problem, rustup 1.20.0 introduces the concept of "profiles". They are groups of components you can choose to download while installing a Rust toolchain. The profiles available at this time are `minimal`, `default`, and `complete`:
31+
32+
* 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 CIs and Windows systems.
33+
* 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.
34+
* The **complete** profile includes all the components available through rustup, including `miri` and IDE integration tools (`rls` and `rust-analysis`).
35+
36+
To change the rustup profile you can use the `rustup set profile` command. For example, to select the minimal profile you can use:
37+
38+
```
39+
rustup set profile minimal
40+
```
41+
42+
It's also possible to choose the profile at installation time, either interactively by choosing the "Customize installation" option or programmaticaly by passing the `--profile=<name>` flag. As usual it will be possible to install individual components not included in your profile with: `rustup component add`.
43+
44+
### Installing the latest compatible nightly
45+
46+
While all components are guaranteed to be present on stable releases of [tier 1 platforms][tiers], the same guarantee doesn't apply to nightly builds. Frequently, tools such as `rustfmt`, `clippy`, or `rls` are missing in the latest nightly. If you depend on these tools, that makes updating nighties hard, as rustup will prevent the upgrade if a component you previously installed is missing.
47+
48+
Starting from rustup 1.20.0, if a component you previously installed is missing in the latest nightly, `rustup update` will walk backwards in time to find the most recent release with all the components you need. If there are no new nightlies with all the components you need you'll either need to wait another day or remove some of them.
49+
50+
Along with this change, rustup 1.20.0 introduces the `--component`/`-c` and `--target`/`-t` flags to the `rustup toolchain install` command, allowing you to add components and targets as the toolchain is installed. These flags will also search past nightlies if the current one does not feature all the requested components.
51+
52+
[tiers]: https://forge.rust-lang.org/release/platform-support.html
53+
54+
### Improvements to `rustup doc`
55+
56+
The `rustup doc` command opens the locally installed documentation on your browser, without any Internet connection required. rustup 1.20.0 enhances the command allowing you to open directly the API documentation of a specific item. For example to look at the documentation of [`Iterator`] you can use:
57+
58+
```
59+
rustup doc std::iter::Iterator
60+
```
61+
62+
This works for traits, structs/enums, macros, and modules, and can take you to the `std`, `alloc`, and `core` crates. We will be improving the command's UX over time, so if you have ideas, please do let us know!
63+
64+
[`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
65+
66+
## Thanks
67+
68+
Thanks to all the contributors who made rustup 1.20.0 possible!
69+
70+
- Nick Cameron
71+
- Andy McCaffrey
72+
- Pietro Albini
73+
- Benjamin Chen
74+
- Artem Borisovskiy
75+
- Jon Gjengset
76+
- Lzu Tao
77+
- Daniel Silverstone
78+
- PicoJr
79+
- Mitchell Hynes
80+
- Matt Kantor

0 commit comments

Comments
 (0)