From c05e28331b42f9bd0d5dc5be21b0ec8f213b2014 Mon Sep 17 00:00:00 2001 From: Sunil <76161837+Cioraz@users.noreply.github.com> Date: Sun, 8 Oct 2023 05:30:07 +0530 Subject: [PATCH] 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 * Update pages/common/cargo-run.md Co-authored-by: pixel * Update pages/common/cargo-run.md Co-authored-by: pixel * Update pages/common/cargo-run.md Co-authored-by: pixel * Update pages/common/cargo-run.md Co-authored-by: pixel * Update pages/common/cargo-run.md Co-authored-by: pixel --------- Co-authored-by: K.B.Dharun Krishna Co-authored-by: pixel --- pages/common/cargo-run.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/common/cargo-run.md diff --git a/pages/common/cargo-run.md b/pages/common/cargo-run.md new file mode 100644 index 0000000000..e73f1c2e71 --- /dev/null +++ b/pages/common/cargo-run.md @@ -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: . + +- 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}}`