Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifact-dependencies doesn't compose well with build-std #12375

Open
tamird opened this issue Jul 18, 2023 · 1 comment
Open

artifact-dependencies doesn't compose well with build-std #12375

tamird opened this issue Jul 18, 2023 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. Z-bindeps Nightly: binary artifact dependencies Z-build-std Nightly: build-std

Comments

@tamird
Copy link
Contributor

tamird commented Jul 18, 2023

Problem

When the artifact dependency needs to be built for a tier 3 target, it often requires the use of build-std. However there is no way to plumb this - .cargo/config.toml can be used to specify

[unstable]
build-std = ["core"]

but cargo doesn't respect these files in workspaces:

At present, when being invoked from a workspace, Cargo does not read config files from crates within the workspace.

When the dependent crate and its artifact dependency aren't in the same workspace, I'm not sure what would happen. My best guess is that .cargo/config.toml is ignored (or absent, having not been published).

Proposed Solution

It seems that the only way to solve this is to allow the dependent crate to specify build-std (and perhaps other such unstable features) in the dependency object alongside "artifact", "target", etc.

Notes

No response

@tamird tamird added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Jul 18, 2023
@weihanglo
Copy link
Member

There was an attempt that moved build-std to Cargo.toml. Here is the comment telling why the team held off it at that time. This will remain open for keeping us aware of the interaction betwee n-Zbindeps and -Zbuild-std. General UX discussions should happen in the dedicated repository, specifically rust-lang/wg-cargo-std-aware#43.

@rustbot label -S-triage +S-needs-design +Z-build-std +Z-bindeps

@rustbot rustbot added S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. Z-bindeps Nightly: binary artifact dependencies Z-build-std Nightly: build-std and removed S-triage Status: This issue is waiting on initial triage. labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. Z-bindeps Nightly: binary artifact dependencies Z-build-std Nightly: build-std
Projects
None yet
Development

No branches or pull requests

3 participants