@@ -77,13 +77,6 @@ Build scripts communicate with Cargo by printing to stdout. Cargo will
77
77
interpret each line that starts with ` cargo:: ` as an instruction that will
78
78
influence compilation of the package. All other lines are ignored.
79
79
80
- > ** Note:** The old invocation prefix ` cargo: ` (one colon only) is deprecated
81
- > and won't get any new features. To migrate, use two-colons prefix ` cargo:: ` ,
82
- > which was added in Rust 1.77. If you were using ` cargo:KEY=VALUE ` for
83
- > arbitrary links manifest key-value pairs, it is encouraged to switch to
84
- > ` cargo::metadata=KEY=VALUE ` . Stick to ` cargo: ` only if the support of Rust
85
- > version older than 1.77 is required.
86
-
87
80
> The order of ` cargo:: ` instructions printed by the build script * may*
88
81
> affect the order of arguments that ` cargo ` passes to ` rustc ` . In turn, the
89
82
> order of arguments passed to ` rustc ` may affect the order of arguments passed
@@ -140,6 +133,9 @@ one detailed below.
140
133
* [ ` cargo::metadata=KEY=VALUE ` ] ( #the-links-manifest-key ) --- Metadata, used by ` links `
141
134
scripts.
142
135
136
+ > ** MSRV:** 1.77 is required for ` cargo::KEY=VALUE ` syntax.
137
+ > To support older versions, use the ` cargo:KEY=VALUE ` syntax.
138
+
143
139
### ` cargo::rustc-link-arg=FLAG ` {#rustc-link-arg}
144
140
145
141
The ` rustc-link-arg ` instruction tells Cargo to pass the [ ` -C link-arg=FLAG `
@@ -264,8 +260,6 @@ the _reachable_ cfg expressions with the [`unexpected_cfgs`][unexpected-cfgs] li
264
260
The syntax of ` CHECK_CFG ` mirrors the ` rustc ` [ ` --check-cfg ` flag] [ option-check-cfg ] , see
265
261
[ Checking conditional configurations] [ checking-conditional-configurations ] for more details.
266
262
267
- > Note: ` cargo:rustc-check-cfg ` (single-colon) can be used if your MSRV is below Rust 1.77
268
-
269
263
The instruction can be used like this:
270
264
271
265
``` rust,no_run
@@ -286,6 +280,8 @@ avoid typos, missing check-cfg, stale cfgs...
286
280
See also the
287
281
[ conditional compilation] [ conditional-compilation-example ] example.
288
282
283
+ > ** MSRV:** Respected as of 1.80
284
+
289
285
[ checking-conditional-configurations ] : ../../rustc/check-cfg.html
290
286
[ option-check-cfg ] : ../../rustc/command-line-arguments.md#option-check-cfg
291
287
[ conditional-compilation-example ] : build-script-examples.md#conditional-compilation
@@ -430,6 +426,9 @@ used.
430
426
Note that metadata is only passed to immediate dependents, not transitive
431
427
dependents.
432
428
429
+ > ** MSRV:** 1.77 is required for ` cargo::metadata=KEY=VALUE ` .
430
+ > To support older versions, use ` cargo:KEY=VAUE ` (unsupported directives are assumed to be metadata keys).
431
+
433
432
[ using-another-sys ] : build-script-examples.md#using-another-sys-crate
434
433
435
434
## ` *-sys ` Packages
0 commit comments