Expand description
§ix-schema — a universal meta-interface for data structures
ix-schema does not serialize anything itself. It is an orchestrator: a
#[derive(Ix)] type publishes a compile-time Manifest describing its
fields, memory layout and schema evolution. Drivers (adapters around
serde, zerocopy, …) read that manifest and do the real work, branching on
const data that folds away — no reflection, no runtime schema parsing.
The crate is #![no_std] for normal builds; everything the manifest carries
is const and therefore free at runtime.
§The two manifests
There are two strictly separate representations:
- the compile-time IR that lives only inside the
ix-schema-deriveproc-macro while it analyses a struct, and - the
constManifestemitted into your crate, read by drivers.
This crate defines the second one — the contract every driver speaks.
Macros§
- assert_
compatible - Statically assert that
$newis a layout-compatible, append-only extension of$old(seeManifest::extends). Fails compilation if a carried field was moved, resized or dropped — catching wire-format breakage before runtime. - migrate_
chain - Generate the transitive closure of
Upgradeimpls for a schema chain.
Structs§
- Evolution
Spec - How a schema version relates to the one before it.
- Field
Spec - Description of a single field within a
Manifest. - Layout
Spec - In-memory layout of a type.
- Manifest
- The semantic manifest: the single source of truth drivers read.
- Variant
Field Spec - Description of a single payload field of a data-carrying enum variant.
- Variant
Spec - Description of a single enum variant.
Enums§
- Field
Change - A single field-level change between two adjacent schema versions.
- Repr
- The
#[repr(..)]of a type, as far as it affects layout stability. - Variant
Kind - How an enum variant carries its payload.
Traits§
- Driver
- A driver adapts an external representation (serde, zerocopy, …) to any
Ixtype by reading itsManifest. - Ix
- The compile-time description of a
#[derive(Ix)]type. - Migrate
From - A type-safe, compile-time migration edge from an older schema version
Prev. - Upgrade
- A multi-hop migration from an older schema
Selfto a later oneTarget.