-
Notifications
You must be signed in to change notification settings - Fork 2.9k
cargo should avoid building things it doesn't need #4280
Copy link
Copy link
Open
Labels
A-build-executionArea: anything dealing with executing the compilerArea: anything dealing with executing the compilerA-crate-typesArea: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)Area: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Metadata
Metadata
Assignees
Labels
A-build-executionArea: anything dealing with executing the compilerArea: anything dealing with executing the compilerA-crate-typesArea: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)Area: crate-type declaration (lib, staticlib, dylib, cdylib, etc.)C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Say you have crate A depending on crate B, and crate B has
crate-type = ["staticlib", "rlib"].You're building crate A, so, the only thing you really need is the rlib of crate B. But cargo still builds both the staticlib and the rlib.
As of now, at least for a combination of staticlib and rlib, it doesn't seem to be a problem, but in an hypothetical future where rust-lang/rust#43212 is implemented, it could make a significant difference.