Skip to content

Commit 210ebb5

Browse files
authored
docs(metadata): Added build_directory to cargo metadata documentation (#15410)
<!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. ### What does this PR try to resolve? Explain the motivation behind this change. A clear overview along with an in-depth explanation are helpful. You can use `Fixes #<issue number>` to associate this PR to an existing issue. ### How should we test and review this PR? Demonstrate how you test this change and guide reviewers through your PR. With a smooth review process, a pull request usually gets reviewed quicker. If you don't know how to write and run your tests, please read the guide: https://doc.crates.io/contrib/tests ### Additional information Other information you want to mention in this PR, such as prior arts, future extensions, an unresolved problem, or a TODO list. --> ### What does this PR try to resolve? Follow up to #15377 that documents `build_directory` in the cargo metadata docs. I did not mention that this feature is not stable yet, let me know if it would be better to a note that this is nightly only. Not sure how we normally handle documenting non-stable features cc: #14125
2 parents 7ade57b + 7edd5b2 commit 210ebb5

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/doc/man/cargo-metadata.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,10 @@ The JSON output has the following format:
318318
*/
319319
"root": "file:///path/to/my-package#0.1.0",
320320
},
321-
/* The absolute path to the build directory where Cargo places its output. */
321+
/* The absolute path to the target directory where Cargo places its output. */
322322
"target_directory": "/path/to/my-package/target",
323+
/* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */
324+
"build_directory": "/path/to/my-package/build-dir",
323325
/* The version of the schema for this metadata structure.
324326
This will be changed if incompatible changes are ever made.
325327
*/

src/doc/man/generated_txt/cargo-metadata.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ OUTPUT FORMAT
314314
*/
315315
"root": "file:///path/to/my-package#0.1.0",
316316
},
317-
/* The absolute path to the build directory where Cargo places its output. */
317+
/* The absolute path to the target directory where Cargo places its output. */
318318
"target_directory": "/path/to/my-package/target",
319+
/* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */
320+
"build_directory": "/path/to/my-package/build-dir",
319321
/* The version of the schema for this metadata structure.
320322
This will be changed if incompatible changes are ever made.
321323
*/

src/doc/src/commands/cargo-metadata.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,10 @@ The JSON output has the following format:
318318
*/
319319
"root": "file:///path/to/my-package#0.1.0",
320320
},
321-
/* The absolute path to the build directory where Cargo places its output. */
321+
/* The absolute path to the target directory where Cargo places its output. */
322322
"target_directory": "/path/to/my-package/target",
323+
/* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */
324+
"build_directory": "/path/to/my-package/build-dir",
323325
/* The version of the schema for this metadata structure.
324326
This will be changed if incompatible changes are ever made.
325327
*/

src/etc/man/cargo-metadata.1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,10 @@ The JSON output has the following format:
320320
*/
321321
"root": "file:///path/to/my\-package#0.1.0",
322322
},
323-
/* The absolute path to the build directory where Cargo places its output. */
323+
/* The absolute path to the target directory where Cargo places its output. */
324324
"target_directory": "/path/to/my\-package/target",
325+
/* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */
326+
"build_directory": "/path/to/my\-package/build\-dir",
325327
/* The version of the schema for this metadata structure.
326328
This will be changed if incompatible changes are ever made.
327329
*/

0 commit comments

Comments
 (0)