Skip to content

Commit ceedb97

Browse files
committed
Some editorial changes to the installation chapters.
1 parent bdb44d4 commit ceedb97

File tree

4 files changed

+35
-25
lines changed

4 files changed

+35
-25
lines changed

doc/src/installation/index.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ and that `CARGO_HOME/bin` is in the `$PATH` environment variable when using
3535
the toolchain.
3636

3737
[Environment Variables]: ../environment-variables.md
38-
[cargo]: https://github.com/rust-lang/cargo
38+
[cargo]: https://doc.rust-lang.org/cargo/
3939

4040
## Installing nightly
4141

42-
When `rustup-init` installs the initial toolchain it _forces_ the installation
43-
and so will install the `nightly` channel regardless of whether it might be
44-
missing components that you want. For example, if you want to make a fresh
42+
If you specify the [nightly channel] when installing `rustup`, the
43+
`rustup-init` script will do a "forced" installation by default. A "forced"
44+
installation means it will install the nightly channel regardless of whether
45+
it might be missing [components] that you want. If you want to install rustup
46+
with the nightly channel, and ensure it has the components that you want, you
47+
will need to do this in two phases. For example, if you want to make a fresh
4548
installation of `rustup` and then install `nightly` along with `clippy` or
46-
`miri` you will need to do this in two phases.
47-
48-
Firstly install `rustup` by means of:
49+
`miri`, first install `rustup` without a toolchain:
4950

5051
```console
5152
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
@@ -61,6 +62,9 @@ rustup toolchain install nightly --allow-downgrade --profile minimal --component
6162
This can be used to great effect in CI, to get you a toolchain rapidly which
6263
meets your criteria.
6364

65+
[nightly channel]: ../concepts/channels.md
66+
[components]: ../concepts/components.md
67+
6468
## Enable tab completion for Bash, Fish, Zsh, or PowerShell
6569

6670
`rustup` now supports generating completion scripts for Bash, Fish, Zsh, and

doc/src/installation/other.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Other installation methods
22

3-
The primary installation method, as described at https://rustup.rs, differs by
4-
platform:
3+
The primary installation method, as described at <https://rustup.rs>, differs
4+
by platform:
55

66
* On Windows, download and run the [rustup-init.exe built for
77
`i686-pc-windows-gnu` target][setup]. In general, this is the build of
@@ -72,7 +72,8 @@ choice:
7272
You can fetch an older version from
7373
`https://static.rust-lang.org/rustup/archive/{rustup-version}/{target-triple}/rustup-init[.exe]`
7474

75-
To install from source just run `cargo run --release`. Note that currently
76-
`rustup` only builds on nightly Rust, and that after installation the `rustup`
77-
toolchains will supersede any pre-existing toolchains by prepending
78-
`~/.cargo/bin` to the `PATH` environment variable.
75+
To install `rustup` from source, check out the git repository from
76+
<https://github.com/rust-lang/rustup> and run `cargo run --release`. Note that
77+
currently `rustup` only builds on nightly Rust, and that after installation
78+
the `rustup` toolchains will supersede any pre-existing toolchains by
79+
prepending `~/.cargo/bin` to the `PATH` environment variable.

doc/src/installation/package-managers.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Several Linux distributions package Rust, and you may wish to use the packaged
44
toolchain, such as for distribution package development. You may also wish to
55
use a `rustup`-managed toolchain such as nightly or beta. Normally, `rustup`
6-
will complain that you already have Rust installed in /usr and refuse to
6+
will complain that you already have Rust installed in `/usr` and refuse to
77
install. However, you can install Rust via `rustup` and have it coexist with
88
your distribution's packaged Rust.
99

@@ -17,13 +17,16 @@ system toolchain, run:
1717
rustup toolchain link system /usr
1818
```
1919

20-
You can then use +system as a `rustup` toolchain, just like +nightly; for
21-
instance, you can run cargo +system build to build with the system toolchain,
22-
or cargo +nightly build to build with nightly.
20+
You can then use "system" as a `rustup` toolchain, just like "nightly".
21+
For example, using the [toolchain override shorthand], you can run `cargo +system build`
22+
to build with the system toolchain, or `cargo +nightly build` to build with nightly.
2323

24-
If you do distribution Rust development, you should likely make +system your
25-
default toolchain:
24+
If you do distribution Rust development, you should likely make "system" your
25+
[default toolchain]:
2626

2727
```console
2828
rustup default system
2929
```
30+
31+
[toolchain override shorthand]: ../overrides.md#toolchain-override-shorthand
32+
[default toolchain]: ../overrides.md#default-toolchain

doc/src/installation/windows.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Visual Studio use the MSVC build of Rust; for interop with GNU software built
1010
using the [MinGW/MSYS2 toolchain] use the GNU build.
1111

1212
When targeting the MSVC ABI, Rust additionally requires an [installation of
13-
Visual Studio 2013 (or later) or the Visual C++ Build Tools 2019][vs] so rustc
14-
can use its linker. For Visual Studio, make sure to check the "C++ tools" and
15-
"Windows 10 SDK" option. No additional software installation is necessary for
16-
basic use of the GNU build.
13+
Visual Studio 2013 (or later) or the Visual C++ Build Tools 2019][vs] so
14+
`rustc` can use its linker. For Visual Studio, make sure to check the "C++
15+
tools" and "Windows 10 SDK" option. No additional software installation is
16+
necessary for basic use of the GNU build.
1717

1818
By default `rustup` on Windows configures Rust to target the MSVC ABI, that is
1919
a target triple of either `i686-pc-windows-msvc` or `x86_64-pc-windows-msvc`
@@ -37,8 +37,6 @@ Or to choose the 64 bit GNU toolchain:
3737
$ rustup set default-host x86_64-pc-windows-gnu
3838
```
3939

40-
[toolchain specification]: #toolchain-specification
41-
4240
Since the MSVC ABI provides the best interoperation with other Windows
4341
software it is recommended for most purposes. The GNU toolchain is always
4442
available, even if you don't use it by default. Just install it with `rustup
@@ -58,7 +56,11 @@ $ rustup target add i686-pc-windows-msvc
5856
$ rustup target add i686-pc-windows-gnu
5957
```
6058

59+
See the [Cross-compilation] chapter for more details on specifying different
60+
targets with the same compiler.
61+
6162
[ABIs]: https://en.wikipedia.org/wiki/Application_binary_interface
63+
[cross-compilation]: ../cross-compilation.md
6264
[GCC toolchain]: https://gcc.gnu.org/
6365
[MinGW/MSYS2 toolchain]: https://msys2.github.io/
6466
[msvc-toolchain]: https://www.rust-lang.org/tools/install?platform_override=win

0 commit comments

Comments
 (0)