CX · Reference guidecx-core-data
PlaygroundDownloadsAboutv0.18.0-pre.1

cx-core-data

the data format: reader, writer, canonical form, schema, codecs, libcx-core, the data-only cx

Why reach for it

Ring 0 is the data format on its own. cx-core-data reads, writes, canonicalises, hashes, validates and converts CX documents, and it cannot execute anything: there is no evaluator in the artifact to switch off. It is the smallest piece of CX you can take on, and the one every other piece is built over (rings).

What is in it: the reader and the writer for the full grammar; the two canonical forms (lossless for cx fmt, strict for cx canon and cx hash); the content hash that gives every document an identity independent of its formatting (identity); schema validation (schema-evolution); the codecs to and from JSON, XML, YAML, TOML, Markdown and the delimited formats (surfaces); typed columnar tables and their binary forms (analytics); libcx-core, the C surface the bindings embed; and the data build of cx, which is this repository and nothing above it.

That last fact is the product. A program is data too — a Ring-0 reader takes [?for …] as an inert tree, hashes it, converts it and hands it on without any means of running it — so you can put the data format where running someone else's code is not acceptable, and the guarantee is structural rather than a promise to be careful.

What it gives you

The data core's surface is the format itself, not a module a program imports, so the table below is empty by design. What it gives you is read on the data-language pages — data, value-model, surfaces, identity — and on the codec reference pages the guide projects from the core's own documentation.

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

Try it

A typed table whose cells are maps, read by the data-only cx and written back in its canonical form — the columns keep their names, the cells keep their shape, and nothing was evaluated on the way.

input.cx

        [t [table[name attrs]]
  alice {role: admin, age: 30}
  bob {role: user, age: 25}
]
      
        $ cx --from=cx --to=cx input.cx
[t [table[name attrs]]
  alice {role: admin, age: 30}
  bob {role: user, age: 25}
]
      

Fixture tab-013-map-cells in conformance/../deps/cx-core-data/conformance/table.cxd — replayed against this cx when the page was built.

Status

The data core was the first repository to leave the front door as a V repository of its own; the front door compiles its V modules from the pin and grades its data-language corpus from the same checkout.

fact as the registry records it
ships as binary
status extracted
pinned at 235ec4eaa
builds on none recorded — the registry row carries no pins= column yet
built on by cx-core-code
bundled modules 0
BUILDS ON THIS REPOSITORY · SHIPS BUILT ON BY none recorded — no pins= on the registry row yet cx-core-data no bundled module — see its row cx-core-code DRAWN FROM registry/repos.cxd's pins= COLUMN AND registry/modules.cxd WHEN THIS PAGE WAS BUILT
Fig. — what cx-core-data 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