Haystack Core
Rust implementation of the Project Haystack data model, codecs, filter engine, entity graph, ontology system, and SCRAM SHA-256 authentication.
Crate Organization
| Module | Description |
|---|---|
[kinds] |
Central value type (Kind) with 15 scalar types (Marker, Number, Str, Ref, etc.) |
[data] |
Collection types: HDict (tag map), HGrid (table), HCol, HList |
[codecs] |
Wire format codecs: Zinc, Trio, JSON, Haystack JSON v3, CSV, and RDF (Turtle/JSON-LD) |
[filter] |
Haystack filter expression parser and evaluator (site and area > 1000) |
[graph] |
In-memory entity graph with bitmap tag indexes, B-tree value indexes, ref adjacency, CSR, and change tracking |
[ontology] |
Haystack 4 def/lib/namespace system with taxonomy, validation, and Xeto support |
[auth] |
SCRAM SHA-256 authentication per the Haystack auth specification |
[xeto] |
Xeto schema language parser and structural type fitting |
Quick Start
use ;
use ;
use EntityGraph;
use codec_for;
// Build an entity
let mut site = new;
site.set;
site.set;
site.set;
site.set;
// Add to graph and query
let mut graph = new;
graph.add.unwrap;
let results = graph.read_all.unwrap;
assert_eq!;
// Encode to Zinc wire format
let zinc = codec_for.unwrap;
let grid = graph.to_grid.unwrap;
let encoded = zinc.encode_grid.unwrap;