1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/cargo-locate-project.md
2023-10-29 09:54:53 +01:00

668 B

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

  • 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 root of the workspace as opposed to the current workspace member:

cargo locate-project --workspace