From e118dba4bdbb3843545495724555934e8a9ea776 Mon Sep 17 00:00:00 2001 From: rami3l Date: Fri, 25 Aug 2023 10:57:35 +0800 Subject: [PATCH 1/2] Adjust section titles in the user guide I found `package-managers` ambiguous since it could mean installing `rustup` using a package manager, or installing `rustup` while already using externally-managed `rust` toolchains. Hopefully this change will make that ambiguity disappear. --- doc/user-guide/book.toml | 3 +++ doc/user-guide/src/SUMMARY.md | 4 ++-- .../{package-managers.md => already-installed-rust.md} | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) rename doc/user-guide/src/installation/{package-managers.md => already-installed-rust.md} (98%) diff --git a/doc/user-guide/book.toml b/doc/user-guide/book.toml index 03889b5baf..ab6b76ff3d 100644 --- a/doc/user-guide/book.toml +++ b/doc/user-guide/book.toml @@ -6,3 +6,6 @@ title = "The rustup book" edit-url-template = "https://github.com/rust-lang/rustup/edit/master/doc/user-guide/{path}" git-repository-url = "https://github.com/rust-lang/rustup/tree/master/doc/user-guide" site-url = "https://rust-lang.github.io/rustup/" + +[output.html.redirect] +"/installation/package-managers.html" = "already-installed-rust.html" diff --git a/doc/user-guide/src/SUMMARY.md b/doc/user-guide/src/SUMMARY.md index 583f95f988..1b761d6d16 100644 --- a/doc/user-guide/src/SUMMARY.md +++ b/doc/user-guide/src/SUMMARY.md @@ -3,9 +3,9 @@ [Introduction](index.md) - [Installation](installation/index.md) - [Windows](installation/windows.md) - - [MSVC Prerequistes](installation/windows-msvc.md) + - [MSVC prerequisites](installation/windows-msvc.md) - [Other installation methods](installation/other.md) - - [Package managers](installation/package-managers.md) + - [Already installed Rust?](installation/already-installed-rust.md) - [Concepts](concepts/index.md) - [Channels](concepts/channels.md) - [Toolchains](concepts/toolchains.md) diff --git a/doc/user-guide/src/installation/package-managers.md b/doc/user-guide/src/installation/already-installed-rust.md similarity index 98% rename from doc/user-guide/src/installation/package-managers.md rename to doc/user-guide/src/installation/already-installed-rust.md index b897bb4150..7e13a8eca6 100644 --- a/doc/user-guide/src/installation/package-managers.md +++ b/doc/user-guide/src/installation/already-installed-rust.md @@ -1,4 +1,4 @@ -# Package managers +# Already installed Rust? Several Linux distributions package Rust, and you may wish to use the packaged toolchain, such as for distribution package development. You may also wish to From 1ae0c50825e4f0c458358aace0e7c84390f8a51c Mon Sep 17 00:00:00 2001 From: rami3l Date: Fri, 25 Aug 2023 11:12:09 +0800 Subject: [PATCH 2/2] Mention `brew install rustup-init` in the user guide --- doc/user-guide/src/installation/other.md | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/user-guide/src/installation/other.md b/doc/user-guide/src/installation/other.md index a514e92740..61106f8f19 100644 --- a/doc/user-guide/src/installation/other.md +++ b/doc/user-guide/src/installation/other.md @@ -29,6 +29,32 @@ $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --default-toolchain nightly ``` + +## Using a package manager + +> Please note that the rustup project is not maintaining any package mentioned in this section. +> If you have encountered any problems installing `rustup` with a package manager, +> please contact the package maintainer(s) for further information. + +### Homebrew + +You can use `brew` to install `rustup-init`[^not-rust]: + +```sh +$ brew install rustup-init +``` + +Then execute `rustup-init` to proceed with the installation. + +When the installation is complete, +make sure that `$HOME/.cargo/bin` is in your `$PATH`, +and you should be able to use `rustup` normally. + +[^not-rust]: This is not to be confused with the `rust` package, +which is a `brew`-managed `rust` toolchain installation. + +## Manual installation + If you prefer you can directly download `rustup-init` for the platform of your choice: @@ -106,6 +132,8 @@ choice: You can fetch an older version from `https://static.rust-lang.org/rustup/archive/{rustup-version}/{target-triple}/rustup-init[.exe]` +## Self-compiled installation + To install `rustup` from source, check out the git repository from and run `cargo run --release`. Note that after installation the `rustup` toolchains will supersede any pre-existing