cargo-*: add page (#11349)

* 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ñú <magallania@gmail.com>

* cargo-verify-project: "correctness" => "the correctness"

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

---------

Co-authored-by: Darío Hereñú <magallania@gmail.com>
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
pull/23/head
Lena 2023-11-01 02:24:54 +01:00 committed by GitHub
parent 1ac2eb6f59
commit f1673431e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# cargo pkgid
> Print the fully qualified package ID specifier for a package or dependency in the current workspace.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-pkgid.html>.
- 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}}`

View File

@ -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: <https://doc.rust-lang.org/cargo/commands/cargo-tree.html>.
- 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}}`

View File

@ -0,0 +1,8 @@
# cargo vendor
> Vendor all dependencies of a project into the specified directory (default: `vendor`).
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-vendor.html>.
- Vendor dependencies and configure `cargo` to use the vendored sources in the current project:
`cargo vendor {{path/to/directory}} > .cargo/config.toml`

View File

@ -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: <https://doc.rust-lang.org/cargo/commands/cargo-verify-project.html>.
- 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}}`