tpt-archon-core
Phase 1 of tpt-archon: a
#![no_std], zero-allocation storage engine providing crash-safe,
concurrent access to fixed-size pages on a block device.
Modules
block— theBlockDevicebackend abstraction withInMemoryBlockDevice, (behind thestdfeature)FileBlockDevice, and (behind the opt-inmmapfeature)MmapBlockDevice— real OS-mmap-backed, genuinely zero-copy read access viapage_ref(writes unsupported by design; see its module docs).zerocopy— fixed-capacity byte buffers (FixedBuf) and little-endian, bounds-checkedCursor/Readerfor page/WAL framing with no heap allocation and noserde.page— a fixed-sizePageplus aBufferPoolwith aFree/Clean/Dirty/Pinnedstate machine and LRU eviction with dirty-page writeback.wal— an append-only, LSN-ordered write-ahead log with CRC32 framing and crash-recovery replay that truncates a torn tail.btree— a Lehman & Yao B-Link tree (right-links + high keys) with point lookups, range scans and node-splitting inserts. Node capacity is checked at compile time to fit within a page.storage— aStorageEnginefacade wiring theBufferPoolto theWal: page writes go through the write-ahead log before main storage, andStorageEngine::recoverreplays it after a crash.faultsim— a testing tool, not a runtime feature: injects power-loss-shaped corruption (truncated tails, flipped bytes, zeroed records) and asserts recovery always yields a prefix-consistent state. The runtime counterpart to thetpt-telosreplay-consistency harness informal-proofs/.
No
tpt-zero-bytes. That crate was never built. The zero-allocation primitives live inzerocopyon purpose — do not add a dependency on a crate by that name.
Features
std(default) — enables the file-backedFileBlockDevice(needsstd::fs). Build with--no-default-featuresfor a fullyno_stdconfiguration.mmap— enablesMmapBlockDevice(impliesstd). Off by default; uses the cross-platformmemmap2crate (mmap(2)on Unix,CreateFileMappingWon Windows), so no target gating is needed.
Example
See examples/storage_tour.rs for a tour through
the block device, buffer pool, WAL, and B-Link tree.
License
Licensed under either of MIT or Apache-2.0 at your option.