Skip to content

Commit 99cb8e4

Browse files
committed
docs(user-guide): use brew install rustup instead of rustup-init
1 parent 4b0f03b commit 99cb8e4

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

doc/user-guide/src/installation/other.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,39 @@ $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile
3838
> If you have encountered any problems installing `rustup` with a package manager,
3939
> please contact the package maintainer(s) for further information.
4040
41+
### General tips
42+
43+
Different package managers take slightly different approaches towards managing rustup.
44+
After installing rustup with your favorite package manager, there are usually two possibilities:
45+
46+
- If your package manager has made the `rustup` command available
47+
together with proxies for Rust tools such as `rustc` and `cargo`,
48+
picking a default toolchain (e.g. `stable`) would usually be enough:
49+
50+
```sh
51+
$ rustup default stable
52+
```
53+
54+
> As of 2024/07/24, this is the case for
55+
> [DNF](https://developer.fedoraproject.org/tech/languages/rust/further-reading.html).
56+
57+
- If your package manager has only made the `rustup-init` command available, simply run:
58+
59+
```sh
60+
$ rustup-init
61+
```
62+
63+
This will allow you to perform the initial setup of `rustup`, populate all the proxies
64+
managed by rustup, and install a default toolchain. When the installation is completed,
65+
please make sure that these proxies (usually under `$HOME/.cargo/bin`) are exposed via your `$PATH`.
66+
67+
> As of 2024/07/24, this is the case for
68+
> [APT](https://packages.debian.org/search?searchon=names&keywords=rustup),
69+
> [homebrew](https://formulae.brew.sh/formula/rustup)
70+
> and [pacman](https://wiki.archlinux.org/title/Rust#Arch_Linux_package).
71+
72+
Now you should be able to run `rustup`, `rustc`, `cargo`, etc. normally.
73+
4174
### APT
4275

4376
Starting from Debian 13 (trixie) and Ubuntu 24.04 (noble),
@@ -49,17 +82,16 @@ $ sudo apt install rustup
4982

5083
### Homebrew
5184

52-
You can use `brew` to install `rustup-init`[^not-rust]:
85+
You can use `brew` to install `rustup`[^not-rust]:
5386

5487
```sh
55-
$ brew install rustup-init
88+
$ brew install rustup
5689
```
5790

58-
Then execute `rustup-init` to proceed with the installation.
59-
60-
When the installation is complete,
61-
make sure that `$HOME/.cargo/bin` is in your `$PATH`,
62-
and you should be able to use `rustup` normally.
91+
Please note that Rust tools like `rustc` and `cargo` are not available via `$PATH` by default
92+
in this `rustup` distribution
93+
(see [homebrew-core#177582](https://github.com/Homebrew/homebrew-core/pull/177582) for more details).
94+
You might want to add `$(brew --prefix rustup)/bin` to `$PATH` to make them easier to access.
6395

6496
[^not-rust]: This is not to be confused with the `rust` package,
6597
which is a `brew`-managed `rust` toolchain installation.

0 commit comments

Comments
 (0)