cargo-metadata: add page (#11114)

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
pull/23/head
Pranav Kale 2023-10-22 01:16:27 +05:30 committed by GitHub
parent aa10402b9e
commit 052f1aca8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# cargo metadata
> Outputs the workspace members and resolved dependencies of current package.
> Note: The output format is subject to change in future versions of Cargo.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-metadata.html>.
- Print the workspace members and resolved dependencies of the current package:
`cargo metadata`
- Print only the workspace members and do not fetch dependencies:
`cargo metadata --no-deps`
- Print metadata in a specific format based on the specified version:
`cargo metadata --format-version {{version}}`
- Print metadata with the `resolve` field including dependencies only for the given target triple (Note: the `packages` array will still include the dependencies for all targets):
`cargo metadata --filter-platform {{target_triple}}`