1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-08 04:35:46 +02:00
tldr/pages/common/cargo-metadata.md
Managor 5305776d45
*: capitalize the first letter after "Note:" (#16226)
Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
2025-05-04 05:15:17 +03:00

21 lines
810 B
Markdown

# cargo metadata
> Output the workspace members and resolved dependencies of current package as JSON.
> 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}}`