From 3c1b1ea1f6039aa1c2d083a795c3fa4fa9252a3b Mon Sep 17 00:00:00 2001 From: Pranav Kale Date: Fri, 20 Oct 2023 12:40:26 +0530 Subject: [PATCH] cargo-locate-project: add page (#10999) * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * add page: cargo-locate-project * cargo-locate-project: add page * cargo-locate-project: add page * Apply suggestions from code review Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: K.B.Dharun Krishna --------- Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: K.B.Dharun Krishna --- pages/common/cargo-locate-project.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/common/cargo-locate-project.md diff --git a/pages/common/cargo-locate-project.md b/pages/common/cargo-locate-project.md new file mode 100644 index 0000000000..928a2aa319 --- /dev/null +++ b/pages/common/cargo-locate-project.md @@ -0,0 +1,21 @@ +# cargo locate-project + +> Print the full path to the `Cargo.toml` manifest of the current project. +> If the project is part of a workspace, the manifest of the project is shown, rather than that of the workspace. +> More information: . + +- Print the JSON object to `stdout` with full path to the `Cargo.toml` manifest: + +`cargo locate-project` + +- Print the project path in the specified format: + +`cargo locate-project --message-format {{plain|json}}` + +- Print the `Cargo.toml` manifest located at the given path: + +`cargo locate-project --manifest-path {{path/to/Cargo.toml}}` + +- Print the `Cargo.toml` manifest located at the root of the workspace as opposed to the current workspace member: + +`cargo locate-project --workspace`