Skip to content

Commit bc2088e

Browse files
committed
change to 'cargo rustc'
1 parent beacf7a commit bc2088e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

text/0000-cargo-cli-crate-type.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Summary
99
[summary]: #summary
1010

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.
1212

1313
[Previous implementation PR](https://github.com/rust-lang/cargo/pull/8789)
1414

@@ -26,22 +26,22 @@ Lastly, being able to pick a specific crate type also decreases build times when
2626
# Guide-level explanation
2727
[guide-level-explanation]: #guide-level-explanation
2828

29-
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`.
3030

3131
Some examples:
3232

3333
```shell
34-
cargo build --crate-type staticlib
34+
cargo rustc --crate-type staticlib
3535

36-
cargo build --crate-type cdylib --features ffi
36+
cargo rustc --crate-type cdylib --features ffi
3737
```
3838

3939
# Reference-level explanation
4040
[reference-level-explanation]: #reference-level-explanation
4141

4242
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).
4343

44-
The argument will be added for `cargo build` and `cargo rustc`.
44+
The argument will be added for `cargo rustc`.
4545

4646
As with the existing `crate-type` manifest property, this will only work when building a `lib` or `example`.
4747

@@ -53,7 +53,7 @@ crate-type = ["lib", "staticlib", "cdylib"]
5353
```
5454

5555
```shell
56-
cargo build --crate-type staticlib
56+
cargo rustc --crate-type staticlib
5757
```
5858

5959
This will produce output only as a `staticlib`, ignoring the other values in the manifest.

0 commit comments

Comments
 (0)