uu-graph-r 0.6.0

Embedded, persistent knowledge graph and the shared core of the lituus-io stack: TTL-driven freshness, lineage walks, zero-copy mmap snapshots, token-budgeted local lookups
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Author: spicyzhug@gmail.com
// Copyright: lituus-io, all rights reserved
//
//! On-disk formats. Two files, one discipline:
//!
//! - [`base`] — `graph.base`, the immutable mmapped snapshot: checksummed
//!   128-byte header, section directory, 64-byte-aligned sections, and a
//!   whole-file xxh3 trailer, written via tmp + fsync + rename.
//! - [`wal`] — `graph.wal`, the append-only log: one checksummed record per
//!   transaction, read in place; replay stops at the first torn record, and a
//!   record whose checksum holds but whose contents do not is corrupt.
//!
//! Every decoder returns [`crate::Error::Format`] on malformed input (and
//! [`crate::Error::Version`] on a well-formed header of another version) and caps
//! preallocation by the bytes actually remaining — never trust a length field.

pub mod base;
pub mod wal;