mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 08:35:23 +02:00
cargo-{install,uninstall,search}: add page (#11351)
This commit is contained in:
parent
ab8e6f24c4
commit
03161cf052
3 changed files with 41 additions and 0 deletions
20
pages/common/cargo-install.md
Normal file
20
pages/common/cargo-install.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# cargo install
|
||||
|
||||
> Build and install a Rust binary.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-install.html>.
|
||||
|
||||
- Install a package from <https://crates.io> (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`
|
13
pages/common/cargo-search.md
Normal file
13
pages/common/cargo-search.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# cargo search
|
||||
|
||||
> Search for packages on <https://crates.io>.
|
||||
> The crates are displayed along with descriptions in TOML format suitable for copying into `Cargo.toml`.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-search.html>.
|
||||
|
||||
- Search for packages:
|
||||
|
||||
`cargo search {{query}}`
|
||||
|
||||
- Show `n` results (default: 10, max: 100):
|
||||
|
||||
`cargo search --limit {{n}} {{query}}`
|
8
pages/common/cargo-uninstall.md
Normal file
8
pages/common/cargo-uninstall.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# cargo uninstall
|
||||
|
||||
> Remove a Rust binary installed using `cargo install`.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-uninstall.html>.
|
||||
|
||||
- Remove an installed binary:
|
||||
|
||||
`cargo remove {{package_spec}}`
|
Loading…
Add table
Reference in a new issue