Open
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