Skip to main content

Crate rete_core

Crate rete_core 

Source
Expand description

Core on-disk types for the Rete graph file format.

See docs/SPEC.md for the full design. This crate owns the byte-level layout (header, directory, blocks) and is deliberately free of any I/O or query logic so it compiles cleanly to both native and wasm32.

Re-exports§

pub use ingest::GraphLayout;
pub use iri::iri_content_defect;
pub use iri::sanitize_iri_content;
pub use iri::sanitize_term;
pub use iri::term_defect;
pub use iri::IriDefect;
pub use iri::IriReport;

Modules§

build_trace
The build trace: where a build spent its wall clock, and what its external sorts did — the debugging half of the build record that rete build stores in the kind-7 build-info section.
card
Stable Dataset Card API — both halves of a card, so that every writer (rete build --card-file, the browser builder, any language binding, any third-party tool) produces the same card from the same graph.
format
Stable file-format, reader, and in-memory build API.
geo3
A 3D extension of the GeoSPARQL built-ins (geo3).
ingest
Ingestion: parse RDF text (N-Triples / N-Quads / Turtle) and assemble a complete .rete file image. Shared by the CLI’s build/validate commands and the wasm bindings (the playground’s in-browser builder).
iri
IRI validity — what may appear between the angle brackets of an N-Triples / N-Quads IRIREF, and the one lossy repair the exporter offers.
label_index
The LABEL_INDEX section (kind 8, SPEC §6.4): every labelled subject’s display label, sorted for prefix search, in a multi-level table that a remote reader walks with a handful of small range reads.
manifest
Manifest — a writable logical graph as an ordered log of immutable .rete segments.
query
Stable SPARQL, graph-pattern, federation, and result API.
range
Stable byte-range and lazy-open API for local or remote .rete files.
reasoning
Stable RDFS/OWL reasoning and schema-coherence API.
recard
Re-carding a finished .rete — replacing its Dataset Card and build record without rebuilding it.
schema_section
The SCHEMA section (kind 9, SPEC §7.5): the class hierarchy, the per-level type rollups and lateral class links, the coherence axioms, the planner’s per-predicate query_stats and the characteristic sets — computed without the community dendrogram, so any build writes it, --no-pyramid and the memory-bounded build included.
validation
Stable integrity and SHACL validation API.
write_opts
Writer tuning knobs: index tile size, dictionary chunk size, zstd level and frame shape, and frequency-promoted object ids. The measurements behind the defaults are in docs/BENCHMARK.md (“Compression (0.4)”).

Constants§

VERSION
The engine version, as published on crates.io.