Skip to main content

Module crate_source

Module crate_source 

Source
Expand description

The crates venue behind the seam: another release’s bundle, fetched once, verified against the registry’s own checksum, and cached by that checksum.

The published crate carries every payload root, so the .crate file at an exact version is the bundle for that release. Two reads reach the network: the sparse index, which resolves a selector to one exact version and one checksum, and the archive itself. The archive is verified against the index checksum before anything is kept, unpacked under one directory outside every target, and read back through DirReleaseSource. A checksum already cached is served with no network touch, and an exact version once verified resolves offline too. The bundle is data: nothing under the cache is executed, put on PATH, or written into a repository.

Structs§

CrateReleaseSource
The crates venue for one selector.
Resolved
The one release the selector resolved to.

Constants§

CACHE_DIR
The cache directory under the state root.
CRATE
The crate’s name at the registry.
DL_URL
The archive download root the registry’s config.json names; the crate file lives at <dl>/<crate>/<crate>-<version>.crate.
INDEX_URL
The sparse index entry for the crate, by the registry’s path rule for names of four or more characters: the first two, then the next two, then the name.
RETAIN
How many fetched bundles the cache keeps.