Open and answer this issue on GitHub.
decision · opened 2026-11-08 · updated 2026-11-08 · 0 comments
ADR-286 D23-D27 publish a Nikaia package on crates.io as the crate nikaia_<name>, carrying its .nika sources, its ledger and a stub Cargo.toml for Cargo’s resolver. ADR-286 §6 left the registry question open (“Reversible: the compiler reads a directory”).
Asked in the Rust community, part of it accepts this, but many do not want crates.io to carry packages that are not Rust: generated Rust there is fine, Nikaia sources are not. ADR-286 also names its own costs: no name space of Nikaia’s own (nikaia_foo can be squatted), and resolution by a tool (Cargo) that cannot read the ledger.
Blocked meanwhile: a dependency by version (#551 for its package part), nikaia publish, and every library written outside this repository.
The full decision paper is the record ADR-registry-1 (status Open), on develop: docs/specification/adr/adr-registry-1.md.
A — do nothing: crates.io as ADR-286 decides. For: nothing to build or run. Against: the community’s objection stands; no name space; Cargo resolves without the ledger; every package carries the prefix and a stub.
B — crates.io for the generated Rust (with ledger and proofs, no .nika), Git for the sources, crates.io as the mirror.
For: crates.io carries Rust only; a free mirror. Against: a consumer without the sources cannot check the ledger (ADR-100 D3-D4), so a forged ledger is an unreported data race at the consumer; the build options are frozen at publication instead of being the consumer’s; generated Rust ties a package to one std version; the cross-package analysis stops; Cargo stays in the loop.
C — a registry server of our own, with upload and accounts. For: full control. Against: paid infrastructure the ecosystem stops at; an account system to run, which is exactly what was attacked at npm and PyPI.
D — a Git index fed by pull requests, sources from Git, a canonical archive, mirrors anyone runs (recommended).
For: no running cost; a package is always built from its sources with the consumer’s options, the full analysis and --locked; ownership, semver compatibility and safe duplication are derived from the ledger, not declared; every check is a Nikaia tool (nikaia registry check) that any CI or a maintainer can run, and every mirror is plain files, so neither GitHub Actions nor any host is a lock-in. Against: everything listed under To build in the record’s §5 has to be written (in Nikaia); a first registration needs a human review.
Within D, resolution: Minimal Version Selection (simple, tests lower bounds, does not bring fixes, not what developers expect) or the newest compatible version (recommended: the usual behaviour; its risks are answered by a semver check over API and ledger, a cooling period and a minimal-versions test run; the SAT solver it needs exists, ADR-270 D24).
Julia’s General registry (pull requests with metadata only, CI auto-merge, package servers as mirrors) is closest to D. winget and Homebrew accept manifests by pull request. Go: proxy plus checksum database, Minimal Version Selection. Cargo, npm, pip: a server with upload, newest compatible version, lockfile. Dart and uv: PubGrub for explained conflicts. Debian, CPAN, CTAN: volunteer mirrors trusted through checksums. Nix: a canonical archive format (NAR) for hashing a tree. (From memory, not checked; marked so in the record.)
D with the newest compatible version, as ADR-registry-1 D1-D17 state it, in short:
nkpkg archive (SHA-256, fixed-width length prefixes, entry count, no trailing bytes, strictly sorted paths, no case-only differences, one strict reader, size limits, never shortened); length extension does not apply because no secret is hashed.--minimal-versions tested.v1/sha256/<hash>.nkpkg) any static host serves; nikaia mirror sync, mirror serve, vendor; the foundation mirrors to GitHub and Codeberg release assets, the community adds more, Software Heritage archives the sources.single = true.If accepted: ADR-286 D23-D27 are rewritten with Changed by notes, ADR-336 D2 loses its package part, Part III 13.3 is rewritten, #551 is adjusted, and the build is filed as ready issues.
The cooling period’s length; a transparency log or TUF for the index; access control for private registries; the archive limits’ values; who keeps the registry; whether global state can be detected so single = true is derived.