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;
pub use sysmem::available_memory;
pub use sysmem::default_query_budget_mb;
pub use sysmem::MIN_DEFAULT_QUERY_BUDGET_MB;
pub use sysmem::QUERY_BUDGET_ENV;

Modules§

build_progress
Build progress: where a running build is, for a renderer on another thread — what rete build|merge|recard --progress draws.
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).
http
An HTTP(S)-backed RangeReader for native hosts (SPEC.md §9): point it at a URL and it fetches only the byte ranges a query needs via HTTP Range requests. Behind the http feature, because it brings a network stack; the CLI, the Python wheels and the R package all read remote files through this one implementation. The browser engine has its own readers (sync XHR and fetch), which follow the same contract.
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.
sysmem
The memory available to this process and the default query budget sized from it (native targets only). How much memory this process can still use, and the default query budget that follows from it.
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.