mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
Merge pull request #869 from alx741/cargo
This commit is contained in:
commit
c97b220f5b
1 changed files with 32 additions and 0 deletions
32
pages/common/cargo.md
Normal file
32
pages/common/cargo.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# cargo
|
||||||
|
|
||||||
|
> Rust package manager.
|
||||||
|
> Manage Rust projects and their module dependencies (crates).
|
||||||
|
|
||||||
|
- Search for crates:
|
||||||
|
|
||||||
|
`cargo search {{search_string}}`
|
||||||
|
|
||||||
|
- Install a crate:
|
||||||
|
|
||||||
|
`cargo install {{crate_name}}`
|
||||||
|
|
||||||
|
- List installed crates:
|
||||||
|
|
||||||
|
`cargo install --list`
|
||||||
|
|
||||||
|
- Create a new binary Rust project in the current directory:
|
||||||
|
|
||||||
|
`cargo init --bin`
|
||||||
|
|
||||||
|
- Create a new library Rust project in the current directory:
|
||||||
|
|
||||||
|
`cargo init`
|
||||||
|
|
||||||
|
- Build the Rust project in the current directory:
|
||||||
|
|
||||||
|
`cargo build`
|
||||||
|
|
||||||
|
- Build with multiple parallel jobs:
|
||||||
|
|
||||||
|
`cargo build -j {{jobs}}`
|
Loading…
Add table
Reference in a new issue