cargo-manifest

Alternative and private registries

An alternative registry has its own package index. Private registries may require credentials. Configure the registry by name and select it explicitly in the dependency; an index URL alone does not grant access. Example format: toml. Illustrative only; do not execute against real accounts or unreviewed sources. Expected result (not executed): Illustrative .cargo/config.toml only. A matching dependency can use registry = "workshop"; the example server is intentionally invalid. Common mistake: Putting a token in the URL or confusing the alternative registry with a crates.io mirror.

Formal Syntax & Structure

rust syntaxrust
[registries.NAME] index = "URL"

Working Example

Example Snippetrust
[registries.workshop]index = "sparse+https://registry.example.invalid/index/"
Rust Reference