From 21d2ad3053edc395b1dfaec50da17cac887794c8 Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Sat, 2 Sep 2023 15:12:22 +0200 Subject: [PATCH] rustup: update page, rustup-{show,update,check,default,toolchain,target}: add page (#10642) --- pages/common/rustup-check.md | 8 ++++++++ pages/common/rustup-default.md | 8 ++++++++ pages/common/rustup-show.md | 16 ++++++++++++++++ pages/common/rustup-target.md | 21 +++++++++++++++++++++ pages/common/rustup-toolchain.md | 21 +++++++++++++++++++++ pages/common/rustup-update.md | 12 ++++++++++++ pages/common/rustup.md | 12 ++++++------ 7 files changed, 92 insertions(+), 6 deletions(-) create mode 100644 pages/common/rustup-check.md create mode 100644 pages/common/rustup-default.md create mode 100644 pages/common/rustup-show.md create mode 100644 pages/common/rustup-target.md create mode 100644 pages/common/rustup-toolchain.md create mode 100644 pages/common/rustup-update.md diff --git a/pages/common/rustup-check.md b/pages/common/rustup-check.md new file mode 100644 index 000000000..a4f1abebb --- /dev/null +++ b/pages/common/rustup-check.md @@ -0,0 +1,8 @@ +# rustup check + +> Check for updates to Rust toolchains and `rustup`. +> More information: . + +- Check for all updates: + +`rustup check` diff --git a/pages/common/rustup-default.md b/pages/common/rustup-default.md new file mode 100644 index 000000000..5f51d97c2 --- /dev/null +++ b/pages/common/rustup-default.md @@ -0,0 +1,8 @@ +# rustup default + +> Set the default Rust toolchain. +> More information: . + +- Switch the default Rust toolchain (see `rustup help toolchain` for more information): + +`rustup default {{toolchain}}` diff --git a/pages/common/rustup-show.md b/pages/common/rustup-show.md new file mode 100644 index 000000000..375e87449 --- /dev/null +++ b/pages/common/rustup-show.md @@ -0,0 +1,16 @@ +# rustup show + +> Show installed toolchains, targets and the version of `rustc`. +> More information: . + +- Show all information: + +`rustup show` + +- Show the active toolchain: + +`rustup show active-toolchain` + +- Show the rustup data directory: + +`rustup show home` diff --git a/pages/common/rustup-target.md b/pages/common/rustup-target.md new file mode 100644 index 000000000..8668329bb --- /dev/null +++ b/pages/common/rustup-target.md @@ -0,0 +1,21 @@ +# rustup target + +> Modify a toolchain's supported targets. +> Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains. +> More information: . + +- Add a target to a toolchain: + +`rustup target add --toolchain {{toolchain}} {{target}}` + +- Remove a target from a toolchain: + +`rustup target remove --toolchain {{toolchain}} {{target}}` + +- List available and installed targets for a toolchain: + +`rustup target list --toolchain {{toolchain}}` + +- List installed targets for a toolchain: + +`rustup target list --toolchain {{toolchain}} --installed` diff --git a/pages/common/rustup-toolchain.md b/pages/common/rustup-toolchain.md new file mode 100644 index 000000000..cd9fdcc7d --- /dev/null +++ b/pages/common/rustup-toolchain.md @@ -0,0 +1,21 @@ +# rustup toolchain + +> Manage Rust toolchains. +> See `rustup help toolchain` for more information about toolchains. +> More information: . + +- Install or update a given toolchain: + +`rustup install {{toolchain}}` + +- Uninstall a toolchain: + +`rustup uninstall {{toolchain}}` + +- List installed toolchains: + +`rustup list` + +- Create a custom toolchain by symlinking to a directory: + +`rustup link {{custom_toolchain_name}} {{path/to/directory}}` diff --git a/pages/common/rustup-update.md b/pages/common/rustup-update.md new file mode 100644 index 000000000..499485202 --- /dev/null +++ b/pages/common/rustup-update.md @@ -0,0 +1,12 @@ +# rustup update + +> Update Rust toolchains and `rustup` itself (if not installed using a package manager). +> More information: . + +- Update all installed toolchains and `rustup`: + +`rustup update` + +- Install or update a specific toolchain (see `rustup help toolchain` for more information): + +`rustup update {{toolchain}}` diff --git a/pages/common/rustup.md b/pages/common/rustup.md index 8274bb32f..f94859cd9 100644 --- a/pages/common/rustup.md +++ b/pages/common/rustup.md @@ -1,8 +1,8 @@ # rustup -> Rust toolchain installer. > Install, manage, and update Rust toolchains. -> More information: . +> Some subcommands, such as `toolchain`, `target`, `update`, etc. have their own usage documentation. +> More information: . - Install the nightly toolchain for your system: @@ -12,7 +12,7 @@ `rustup default nightly` -- Use the nightly toolchain when inside the current project, but leave global settings unchanged: +- Use the nightly toolchain when inside the current project but leave global settings unchanged: `rustup override set nightly` @@ -24,10 +24,10 @@ `rustup show` -- Run cargo build with a certain toolchain: +- Run `cargo build` with a certain toolchain: -`rustup run {{toolchain_name}} cargo build` +`rustup run {{toolchain}} cargo build` -- Open the local rust documentation in the default web browser: +- Open the local Rust documentation in the default web browser: `rustup doc`