From 052f1aca8f0a9b1010e1343b06580c9c3dd174a2 Mon Sep 17 00:00:00 2001 From: Pranav Kale Date: Sun, 22 Oct 2023 01:16:27 +0530 Subject: [PATCH] cargo-metadata: add page (#11114) Co-authored-by: Juri Dispan Co-authored-by: K.B.Dharun Krishna Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages/common/cargo-metadata.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/common/cargo-metadata.md diff --git a/pages/common/cargo-metadata.md b/pages/common/cargo-metadata.md new file mode 100644 index 000000000..9899c7a23 --- /dev/null +++ b/pages/common/cargo-metadata.md @@ -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: . + +- 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}}`