Enhance cargo vendor
to dynamically support custom registries
#15045
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-vendor
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
In airgapped or highly secured env, direct access to
crates.io
is not feasible. Instead, users rely on sanitized, mirrored registries for deps resolutions. Currently,cargo vendor
can target a custom registry using the--respect-source-config
flag, but this requires defining a static.cargo/config.toml
file with the desired source configurations.This approach is inflexible and cumbersome, especially for dynamic or ephemeral builds where registry configurations may vary. There is no straightforward way to dynamically specify a custom registry or exclude crates.io without modifying project files
Proposed Solution
cargo vendor
to dynamically specify a custom registry (--registry <registry-name>
).cargo/config.toml
temporarily, providing more flexibility for users in airgapped or dynamic environmentsNotes
The text was updated successfully, but these errors were encountered: