From 43c136ffe7afa6901eaf32ac0a958b652b1bd6b3 Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Tue, 8 Sep 2020 13:19:03 -0300 Subject: [PATCH] cargo-build: add page (#4302) --- pages/common/cargo-build.md | 32 ++++++++++++++++++++++++++++++++ pages/common/cargo-test.md | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 pages/common/cargo-build.md diff --git a/pages/common/cargo-build.md b/pages/common/cargo-build.md new file mode 100644 index 0000000000..fb8c5c866e --- /dev/null +++ b/pages/common/cargo-build.md @@ -0,0 +1,32 @@ +# cargo build + +> Compile a local package and all of its dependencies. +> More information: . + +- Build the package or packages defined by the `Cargo.toml` manifest file in the local path: + +`cargo build` + +- Build artifacts in release mode, with optimizations: + +`cargo build --release` + +- Require that `Cargo.lock` is up to date: + +`cargo build --locked` + +- Build all packages in the workspace: + +`cargo build --workspace` + +- Build a specific package: + +`cargo build --package {{package}}` + +- Build only the specified binary: + +`cargo --bin {{name}}` + +- Build only the specified test target: + +`cargo build --test {{testname}}` diff --git a/pages/common/cargo-test.md b/pages/common/cargo-test.md index e04cd7c459..813237e315 100644 --- a/pages/common/cargo-test.md +++ b/pages/common/cargo-test.md @@ -1,4 +1,4 @@ -# cargo-test +# cargo test > Execute the unit and integration tests of a Rust package. > More information: .