From 03161cf0520ac35c6b8e042105a997403d751180 Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Wed, 1 Nov 2023 06:12:12 +0100 Subject: [PATCH] cargo-{install,uninstall,search}: add page (#11351) --- pages/common/cargo-install.md | 20 ++++++++++++++++++++ pages/common/cargo-search.md | 13 +++++++++++++ pages/common/cargo-uninstall.md | 8 ++++++++ 3 files changed, 41 insertions(+) create mode 100644 pages/common/cargo-install.md create mode 100644 pages/common/cargo-search.md create mode 100644 pages/common/cargo-uninstall.md diff --git a/pages/common/cargo-install.md b/pages/common/cargo-install.md new file mode 100644 index 000000000..022dd8305 --- /dev/null +++ b/pages/common/cargo-install.md @@ -0,0 +1,20 @@ +# cargo install + +> Build and install a Rust binary. +> More information: . + +- Install a package from (the version is optional - latest by default): + +`cargo install {{package}}@{{version}}` + +- Install a package from the specified Git repository: + +`cargo install --git {{repo_url}}` + +- Build from the specified branch/tag/commit when installing from a Git repository: + +`cargo install --git {{repo_url}} --{{branch|tag|rev}} {{branch_name|tag|commit_hash}}` + +- List all installed packages and their versions: + +`cargo install --list` diff --git a/pages/common/cargo-search.md b/pages/common/cargo-search.md new file mode 100644 index 000000000..1316f6f99 --- /dev/null +++ b/pages/common/cargo-search.md @@ -0,0 +1,13 @@ +# cargo search + +> Search for packages on . +> The crates are displayed along with descriptions in TOML format suitable for copying into `Cargo.toml`. +> More information: . + +- Search for packages: + +`cargo search {{query}}` + +- Show `n` results (default: 10, max: 100): + +`cargo search --limit {{n}} {{query}}` diff --git a/pages/common/cargo-uninstall.md b/pages/common/cargo-uninstall.md new file mode 100644 index 000000000..3ec6937a4 --- /dev/null +++ b/pages/common/cargo-uninstall.md @@ -0,0 +1,8 @@ +# cargo uninstall + +> Remove a Rust binary installed using `cargo install`. +> More information: . + +- Remove an installed binary: + +`cargo remove {{package_spec}}`