Skip to content

Enable Mirrored Registry Instead of crates.io #53

@mireysia

Description

@mireysia

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/"'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions