Skip to content

Cargo

NORA implements the Cargo Sparse Index protocol for hosting and proxying Rust crates. Publish private crates and cache public ones from crates.io.

Add NORA as an alternative registry in ~/.cargo/config.toml:

[registries.nora]
index = "sparse+http://nora.example.com:4000/cargo/"

Use the registry:

Terminal window
# Publish
cargo publish --registry nora
# Install
cargo install my-crate --registry nora

To use NORA as the default source for crates.io packages, add:

[source.crates-io]
replace-with = "nora"
[source.nora]
registry = "sparse+http://nora.example.com:4000/cargo/"

NORA proxies index lookups and crate downloads from the upstream registry when a crate is not found locally.

config.toml:

[cargo]
enabled = true
proxy = "https://crates.io"
proxy_timeout = 30

Environment variables:

VariableDescriptionDefault
NORA_CARGO_ENABLEDEnable Cargo registrytrue
NORA_CARGO_PROXYUpstream registry URLhttps://crates.io
NORA_CARGO_PROXY_AUTHUpstream auth (user:pass)
NORA_CARGO_PROXY_TIMEOUTUpstream timeout in seconds30
FeatureStatusNotes
config.jsonFulldl and api fields
Sparse index lookupFullPrefix rules (1/2/3/ab/cd)
Crate downloadFull.crate files by version
cargo publishFullLength-prefixed JSON + .crate
Dependency metadataFullreq, package transforms
SHA256 verificationFullOn publish
Cache-Control headersFullimmutable for downloads, max-age=300 for index
Yank/unyankNot implemented
Owner managementNot implemented
Categories/keywordsPartialStored but not searchable
  • Yank and unyank are not supported — published versions cannot be marked as yanked.
  • Owner management is not implemented.
  • Categories and keywords are stored in metadata but are not searchable.