readcon-db

Mmap-backed CON / convel corpus store — LMDB via Heed, non-SQL selection, xxHash3 exact match, bindings for Rust, C, C++, Python, and Fortran.

v0.1.0 MIT Heed / LMDB xxHash3-128 no SQL

Why a second crate?

readcon-core

Format fidelity — parse, validate, write, multi-language ABI for a stream or file.

readcon-db

Corpus scale — thousands of frames, indexes, mmap residency, selective decode.

Not SQL

Explicit filters and B-tree postings. No planner surprises on hot analysis paths.

Architecture in one breath

mmap

OS page cache holds hot corpus pages — “disk in RAM” without a second buffer pool.

Readers × N

LMDB MVCC read transactions for parallel analysis; single writer for ingest.

Exact match

xxHash3-128 of canonical CON blobs; find_by_hash / select_hash.

Hourglass FFI

Rust core → rkrdb_* C ABI → C++ / Python / Fortran.

Rust

use readcon_db::{ConCorpus, Select};

let db = ConCorpus::open("/tmp/corpus")?;
db.append_trajectory_path(1, "run.con")?;
let keys = db.select(&Select::new().require_symbol("Cu"))?;
let h = db.frame_hash(keys[0])?;

Languages

C / C++

include/readcon-db.hrkrdb_* and RAII readcon_db::Corpus.

Python

maturin develop --features pythonreadcon_db.ConCorpus.

Fortran

fortran/ReadConDb module with bind(C) helpers.