hayson-engine 0.24.0

Storage engine for hayson document databases — the embeddable core behind hayson-server, hayson-cli and hayson-browser
Documentation

hayson-engine

The storage engine behind hayson — a document database on plain text files. This is the embeddable core: one table is one append-only JSONL file (or a directory of them, partitioned by a field's value), alongside a hayson.json catalog document holding every table's schema. In-memory registries (key → file offset, field indexes, a full-text index) make lookups and queries fast without an on-disk index.

hayson-engine has no server, no network, and no isolation levels of its own — it is the same core linked in-process by hayson-server (over gRPC), hayson-cli (local mode) and hayson-browser, and mirrors the TypeScript @theritual/hayson package on the same on-disk format.

Database format: docs/format.md.

Installation

cargo add hayson-engine

Usage

use hayson_engine::database::Database;
use std::path::Path;

let db = Database::open(Path::new("./my-db"))?;

The public API is a hand-curated list of twelve modules — atomic, buffer, catalog, compaction, crypto, database, errors, lock, query, schema, table, txn — each re-exporting the names it means to expose; see their module docs. The layers underneath (the log files, the write queue, the in-memory registries, the index snapshots) are private, and tests/public_api.rs holds the surface to that list.