Skip to content

xtask: support and propagate cargo --config arg #833

Merged
bunnie merged 1 commit intobetrusted-io:devfrom
sbellem:xtask-cargo-config
Mar 18, 2026
Merged

xtask: support and propagate cargo --config arg #833
bunnie merged 1 commit intobetrusted-io:devfrom
sbellem:xtask-cargo-config

Conversation

@sbellem
Copy link
Copy Markdown
Contributor

@sbellem sbellem commented Mar 17, 2026

Problem

There is no way to pass extra cargo configuration (e.g. vendored source paths) through cargo xtask to the underlying cargo invocations. This is needed for offline/sandboxed builds where a custom .cargo/config.toml must be merged in.

Proposed Solution

Accept --config flags in cargo xtask and thread them through all internal cargo invocations.

The cargo() helper is refactored from returning a String to returning a Command with the config flags already applied, so every call site picks them up automatically.

Usage

cargo xtask dabao --config .cargo/vendor.toml

Files changed

  • xtask/src/main.rs — parse --config flag, pass to builder and utility functions
  • xtask/src/builder.rs — store configs in Builder, refactor cargo() to return Command
  • xtask/src/utils.rs — thread cargo_configs through generate_locales(), wycheproof_import(), track_language_changes()

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.
@sbellem sbellem force-pushed the xtask-cargo-config branch from 097d443 to fa14fa7 Compare March 18, 2026 02:06
@sbellem sbellem marked this pull request as ready for review March 18, 2026 02:12
@bunnie
Copy link
Copy Markdown
Member

bunnie commented Mar 18, 2026

looks reasonable, thanks!

@bunnie bunnie merged commit 15e8910 into betrusted-io:dev Mar 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants