You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/0000-cargo-cli-crate-type.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
# Summary
9
9
[summary]: #summary
10
10
11
-
Add the ability to provide `--crate-type <crate-type>` as an argument to `cargo build`. This would have the same affect of adding `crate-type` in the `Cargo.toml`, while taking higher priority than any value specified there.
11
+
Add the ability to provide `--crate-type <crate-type>` as an argument to `cargo rustc`. This would have the same affect of adding `crate-type` in the `Cargo.toml`, while taking higher priority than any value specified there.
When a user builds a library, using `cargo build`, they can provide a `--crate-type` argument to adjust the crate type that is compiled. The argument can be any that can also be listed in the `Cargo.toml`.
29
+
When a user builds a library, using `cargo rustc`, they can provide a `--crate-type` argument to adjust the crate type that is compiled. The argument can be any that can also be listed in the `Cargo.toml`.
A new command-line argument, `--crate-type`, will be added to Cargo. It must be provided a comma-separated list of 1 or more crate types, of which the allowed values are the same as can be [provided in the manifest](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field).
43
43
44
-
The argument will be added for `cargo build` and `cargo rustc`.
44
+
The argument will be added for `cargo rustc`.
45
45
46
46
As with the existing `crate-type` manifest property, this will only work when building a `lib` or `example`.
0 commit comments