From f1673431e18b1a1ea2e0182fce2cda7eab5c601c Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Wed, 1 Nov 2023 02:24:54 +0100 Subject: [PATCH] cargo-*: add page (#11349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cargo-verify-project: add page * cargo-pkgid: add page * cargo-tree: add page * cargo-vendor: add page * cargo-tree: fix typo Co-authored-by: Darío Hereñú * cargo-verify-project: "correctness" => "the correctness" Co-authored-by: Juri Dispan --------- Co-authored-by: Darío Hereñú Co-authored-by: Juri Dispan --- pages/common/cargo-pkgid.md | 12 ++++++++++++ pages/common/cargo-tree.md | 25 +++++++++++++++++++++++++ pages/common/cargo-vendor.md | 8 ++++++++ pages/common/cargo-verify-project.md | 12 ++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 pages/common/cargo-pkgid.md create mode 100644 pages/common/cargo-tree.md create mode 100644 pages/common/cargo-vendor.md create mode 100644 pages/common/cargo-verify-project.md diff --git a/pages/common/cargo-pkgid.md b/pages/common/cargo-pkgid.md new file mode 100644 index 000000000..1ac0e9606 --- /dev/null +++ b/pages/common/cargo-pkgid.md @@ -0,0 +1,12 @@ +# cargo pkgid + +> Print the fully qualified package ID specifier for a package or dependency in the current workspace. +> More information: . + +- Print the fully qualified package specification for the current project: + +`cargo pkgid` + +- Print the fully qualified package specification for the specified package: + +`cargo pkgid {{partial_pkgspec}}` diff --git a/pages/common/cargo-tree.md b/pages/common/cargo-tree.md new file mode 100644 index 000000000..373db979f --- /dev/null +++ b/pages/common/cargo-tree.md @@ -0,0 +1,25 @@ +# cargo tree + +> Display a tree visualization of a dependency graph. +> Note: in the tree, dependencies of packages marked with `(*)` have already been shown elsewhere in the graph, and so are not repeated. +> More information: . + +- Show a dependency tree of the current project: + +`cargo tree` + +- Only show dependencies up to the specified depth (e.g. when `n` is 1, display only direct dependencies): + +`cargo tree --depth {{n}}` + +- Do not display the given package (and its dependencies) in the tree: + +`cargo tree --prune {{package_spec}}` + +- Show all occurrences of repeated dependencies: + +`cargo tree --no-dedupe` + +- Only show normal/build/development dependencies: + +`cargo tree --edges {{normal|build|dev}}` diff --git a/pages/common/cargo-vendor.md b/pages/common/cargo-vendor.md new file mode 100644 index 000000000..c81ec03d8 --- /dev/null +++ b/pages/common/cargo-vendor.md @@ -0,0 +1,8 @@ +# cargo vendor + +> Vendor all dependencies of a project into the specified directory (default: `vendor`). +> More information: . + +- Vendor dependencies and configure `cargo` to use the vendored sources in the current project: + +`cargo vendor {{path/to/directory}} > .cargo/config.toml` diff --git a/pages/common/cargo-verify-project.md b/pages/common/cargo-verify-project.md new file mode 100644 index 000000000..8212f0f42 --- /dev/null +++ b/pages/common/cargo-verify-project.md @@ -0,0 +1,12 @@ +# cargo verify-project + +> Check the correctness of the `Cargo.toml` manifest and print the result as a JSON object. +> More information: . + +- Check the correctness of the current project's manifest: + +`cargo verify-project` + +- Check the correctness of the specified manifest file: + +`cargo verify-project --manifest-path {{path/to/Cargo.toml}}`