xtask: support and propagate cargo --config arg #833
Merged
bunnie merged 1 commit intobetrusted-io:devfrom Mar 18, 2026
Merged
Conversation
Problem: there is no way to pass extra cargo config (e.g. vendored sources) through xtask to the underlying cargo invocations. Solution: accept --config flags in cargo xtask and thread them through all internal cargo invocations. The cargo() helper now returns a Command with the config flags already applied.
097d443 to
fa14fa7
Compare
bunnie
approved these changes
Mar 18, 2026
Member
|
looks reasonable, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
There is no way to pass extra cargo configuration (e.g. vendored source paths) through
cargo xtaskto the underlying cargo invocations. This is needed for offline/sandboxed builds where a custom.cargo/config.tomlmust be merged in.Proposed Solution
Accept
--configflags incargo xtaskand thread them through all internal cargo invocations.The
cargo()helper is refactored from returning aStringto returning aCommandwith the config flags already applied, so every call site picks them up automatically.Usage
Files changed
xtask/src/main.rs— parse--configflag, pass to builder and utility functionsxtask/src/builder.rs— store configs inBuilder, refactorcargo()to returnCommandxtask/src/utils.rs— threadcargo_configsthroughgenerate_locales(),wycheproof_import(),track_language_changes()