Cargo
NORA implements the Cargo Sparse Index protocol for hosting and proxying Rust crates. Publish private crates and cache public ones from crates.io.
Client Configuration
Section titled “Client Configuration”Add NORA as an alternative registry in ~/.cargo/config.toml:
[registries.nora]index = "sparse+http://nora.example.com:4000/cargo/"Use the registry:
# Publishcargo publish --registry nora
# Installcargo install my-crate --registry noraTo 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/"Upstream Proxy
Section titled “Upstream Proxy”NORA proxies index lookups and crate downloads from the upstream registry when a crate is not found locally.
config.toml:
[cargo]enabled = trueproxy = "https://crates.io"proxy_timeout = 30Environment variables:
| Variable | Description | Default |
|---|---|---|
NORA_CARGO_ENABLED | Enable Cargo registry | true |
NORA_CARGO_PROXY | Upstream registry URL | https://crates.io |
NORA_CARGO_PROXY_AUTH | Upstream auth (user:pass) | — |
NORA_CARGO_PROXY_TIMEOUT | Upstream timeout in seconds | 30 |
Features
Section titled “Features”| Feature | Status | Notes |
|---|---|---|
config.json | Full | dl and api fields |
| Sparse index lookup | Full | Prefix rules (1/2/3/ab/cd) |
| Crate download | Full | .crate files by version |
cargo publish | Full | Length-prefixed JSON + .crate |
| Dependency metadata | Full | req, package transforms |
| SHA256 verification | Full | On publish |
| Cache-Control headers | Full | immutable for downloads, max-age=300 for index |
| Yank/unyank | — | Not implemented |
| Owner management | — | Not implemented |
| Categories/keywords | Partial | Stored but not searchable |
Known Limitations
Section titled “Known Limitations”- 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.