CX · Reference guidecx-registry
PlaygroundDownloadsAboutv0.18.0-pre.1

cx-registry

the package index: the store, publisher keys, the publish program

Why reach for it

A git repository is a package registry, and the review is the publish gate. cx-registry is the package index: a file:// CX store laid out in a repository — content trees, sealed manifests and name@version aliases — the publisher identity that signs them, and the publish program that seals, signs, publishes and re-verifies in one run. No service is needed to consume it: clone it, open the store, install by alias.

Integrity is the artifact's, never the transport's: a package is a canonical content tree addressed by its hash, a manifest sealed beside it — the tag-object pattern — and a publisher's signature over that hash; a released alias is immutable, so a new artifact is a new version and a rollback is a hash identity rather than a guess. Publishing is a reviewed commit: run the program, commit the new store objects and the alias, open the pull request. Consuming runs the whole verification chain offline on every install, and vendoring is a store clone.

The same objects re-host without re-packaging: the next stage serves the store over the wire, discovery becomes a catalog query pushed down to the store, and fetch, verify and install run by hash exactly as before. The guide's dist-registry and dist-consuming chapters walk the two sides; the verbs are the application host's, which is where the corpus that grades them lives.

What it gives you

No module and no V code: the repository is a store, a key document and one program written over the application host's package verbs and the store, so the table below is the generator's note. What it gives you is the index itself, and the shape every later stage keeps.

This repository ships no bundled module of its own; what it gives you is above, and its links are below.

Try it

The store object a package is: two content trees built from the same entries named in two orders, put into a store, one hash — canonical order is the tree's, not the author's, which is why re-publishing identical sources yields byte-identical objects. The case is the application host's; the store it writes to is the store the index lays out on disk.

prog.cx

        [?lib 'cx-platform/xap' as=xap]
[?lib 'cx-platform/store' as=store]
[?let [= $s [$store:open "mem://"]]
 [= $t1 [$xap:pkg-tree ([entry path='b.cx' 'bee'], [entry path='a.cx' 'ay'])]]
 [= $t2 [$xap:pkg-tree ([entry path='a.cx' 'ay'], [entry path='b.cx' 'bee'])]]
 [= [$store:put-doc $s $t1] [$store:put-doc $s $t2]]]
      
        $ cx prog.cx
true
      

Fixture xap-dist-001-tree-canonical-order in deps/cx-platform-xap/conformance/xap/xap-dist.cxd — replayed against this cx when the page was built.

Status

The front door pins nothing of the index — it is consumed by file:// and by the wire, not compiled in — so the registry row carries an at= and deps.cxd carries no row, and the figure draws the repository alone. Its own pin document names what it builds on; a publish is a pull request against it.

fact as the registry records it
ships as none
status extracted
pinned at a70cbe927 — the registry's at=; deps.cxd carries no row for it, so nothing of it is in the build
builds on none recorded — the registry row carries no pins= column yet
built on by nothing pins it yet
bundled modules 0
BUILDS ON THIS REPOSITORY · SHIPS BUILT ON BY none recorded — no pins= on the registry row yet cx-registry no bundled module — see its row nothing pins it yet DRAWN FROM registry/repos.cxd's pins= COLUMN AND registry/modules.cxd WHEN THIS PAGE WAS BUILT
Fig. — what cx-registry plugs into: the repositories it builds on (left), the modules it ships (centre), the repositories that build on it (right) · drawn from registry/repos.cxd, deps.cxd and registry/modules.cxd when this page was built