-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)A-lockfileArea: Cargo.lock issuesArea: Cargo.lock issuesA-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesA-workspacesArea: workspacesArea: workspacesC-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`Command-vendorS-needs-rfcStatus: Needs an RFC to make progress.Status: Needs an RFC to make progress.
Description
Spun off from the specific proposal in #4544 (comment)
"A random solution which may help solve this though is to perhaps list the valid targets for a project in a workspace root Cargo.toml. That way Cargo could be smarter and just vendor dependencies for those targets (and alter resolution so it won't include winapi in the lock file)"
This would help projects like Firefox and Fuchsia that vendor their dependencies by allowing them to avoid vendoring crates that are only necessary for platforms that the project does not support (see also #7058).
cc @cramertj
See also
- Support [target.'cfg(...)'.lib] sections #12260 for specifying build target configuration per platform
- Target configuration for binaries #9208 for specifying supported platform targets for build targets
cramertj, j16r, repi, mankinskin, c0mm4nd and 45 morevyas-n and benluelo
Metadata
Metadata
Assignees
Labels
A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)A-lockfileArea: Cargo.lock issuesArea: Cargo.lock issuesA-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesA-workspacesArea: workspacesArea: workspacesC-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`Command-vendorS-needs-rfcStatus: Needs an RFC to make progress.Status: Needs an RFC to make progress.