Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
use cases for alternative registries

This is a list of potential use cases for something like alternative registries & some analysis of how to solve these use cases.

As context, a registry contains two network service components:

  1. The index: a git repository containing metadata about the packages in the registry
  2. The crate source: an HTTP server serving the actual package data

Private registry

I want to host my own crates separately from, to serve to people with appropriate access.

This is the use case squarely covered by the current alternative registries feature. The alternative registries feature lets you teach cargo about the existence of a registry other than the default registry, allowing you to depend on crates from multiple registries at the same time.


I want to replace with my own private mirror, possibly containing additional crates. I want to "airgap" myself from the official ecosystem.

We already allow you to redirect the index to a new index through two different mechanisms (!), both through .cargo/config:

  1. The registry.index key will override the index for the default registry
  2. Using source replacement with a registry source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.