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

Enable Mirrored Registry Instead of crates.io #53

Open
mireysia opened this issue Jan 10, 2025 · 0 comments
Open

Enable Mirrored Registry Instead of crates.io #53

mireysia opened this issue Jan 10, 2025 · 0 comments

Comments

@mireysia
Copy link

Problem

In airgapped or highly secured environments, direct access to crates.io is not feasible. Instead, users rely on sanitized, mirrored registries for dependency resolution. Currently, Reindeer can use cargo vendor --respect-source-config to target a custom registry, but this requires defining a static .cargo/config.toml file with the desired source configurations.

Proposed solution

Introduce a new section in the reindeer.toml file to define different registry config. This is eliminates the need for modifying project specific .cargo/config.toml files

[source]
name = "mirrors"
registry = "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"

Update cargo vendor command

cargo vendor --respect-source-config \
 --config 'source.crates-io.replace-with="mirror"' \
 --config 'source.mirror.registry="sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"'
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

No branches or pull requests

1 participant