Skip to content

Commit 17ba198

Browse files
committed
rephrase how cargo::metadata can be used
1 parent 66221ab commit 17ba198

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/doc/src/reference/build-scripts.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,12 @@ key-value pairs. This metadata is set with the `cargo::metadata=KEY=VALUE`
432432
instruction.
433433

434434
The metadata is passed to the build scripts of **dependent** packages. For
435-
example, if the package `bar` depends on `foo`, then if `foo` generates
436-
`key=value` as part of its build script metadata, then the build script of
437-
`bar` will have the environment variables `DEP_FOO_KEY=value`. See the ["Using
438-
another `sys` crate"][using-another-sys] for an example of how this can be
439-
used.
435+
example, if the package `foo` depends on `bar`, which links `baz`, then if
436+
`bar` generates `key=value` as part of its build script metadata, then the
437+
build script of `foo` will have the environment variables `DEP_BAZ_KEY=value`
438+
(note that the value of the `links` key is used).
439+
See the ["Using another `sys` crate"][using-another-sys] for an example of
440+
how this can be used.
440441

441442
Note that metadata is only passed to immediate dependents, not transitive
442443
dependents.

0 commit comments

Comments
 (0)