Module elba::index[][src]

An index from which information/metadata about available packages is obtained.

Design

Indices provide metadata about available packages from a particular source. Multiple indices can be specified at once, and a default index can be specified in configuration for packages with version constraints but no explicitly specified index. By default, the official index is set to be the default.

The packages that the index offers must have a direct source: they cannot point to other registries. Because the package doesn't necessarily need to be a tarball stored somewhere, indices can serve to "curate" packages from disparate repositories and other sources (think Purescript package sets). The dependencies of a package in an index must be located either in the same index or a dependent index of the current index (as specified in the index's config).

Tarballs are the only source which can contain a checksum, by nature of the way they're constructed internally.

A package can only be published to the official index if it only depends on packages in the official index.

Prior art

This design follows closely with that of Cargo's, specifically with their RFC enabling unofficial registries.

Structs

Dep

A dependency.

Index

Struct Index defines a single index.

IndexEntry
Indices

Type Definitions

ResolvedDep
ResolvedEntry
TomlDep
TomlEntry