mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 00:02:07 +02:00
cargo-run: add page (#10795)
* Added docs for cargo run * Added docs for cargo run * Update pages/common/cargo-run.md Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * Update pages/common/cargo-run.md Co-authored-by: pixel <pixel+github@chrissx.de> * Update pages/common/cargo-run.md Co-authored-by: pixel <pixel+github@chrissx.de> * Update pages/common/cargo-run.md Co-authored-by: pixel <pixel+github@chrissx.de> * Update pages/common/cargo-run.md Co-authored-by: pixel <pixel+github@chrissx.de> * Update pages/common/cargo-run.md Co-authored-by: pixel <pixel+github@chrissx.de> --------- Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: pixel <pixel+github@chrissx.de>
This commit is contained in:
parent
6b37ad2f56
commit
c05e28331b
1 changed files with 33 additions and 0 deletions
33
pages/common/cargo-run.md
Normal file
33
pages/common/cargo-run.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# cargo run
|
||||||
|
|
||||||
|
> Run the current Cargo package.
|
||||||
|
> Note: Set the working directory of the binary executed to the current working directory.
|
||||||
|
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-run.html>.
|
||||||
|
|
||||||
|
- Run the default binary target:
|
||||||
|
|
||||||
|
`cargo run`
|
||||||
|
|
||||||
|
- Run the specified binary:
|
||||||
|
|
||||||
|
`cargo run --bin {{name}}`
|
||||||
|
|
||||||
|
- Run the specified example:
|
||||||
|
|
||||||
|
`cargo run --example {{name}}`
|
||||||
|
|
||||||
|
- Activate a space or comma separated list of features:
|
||||||
|
|
||||||
|
`cargo run --features {{feature1 feature2 ...}}`
|
||||||
|
|
||||||
|
- Disable the default feature:
|
||||||
|
|
||||||
|
`cargo run --no-default-features`
|
||||||
|
|
||||||
|
- Activate all available features:
|
||||||
|
|
||||||
|
`cargo run --all-features`
|
||||||
|
|
||||||
|
- Run with the given profile:
|
||||||
|
|
||||||
|
`cargo run --profile {{name}}`
|
Loading…
Add table
Reference in a new issue