tpt-archon-core 0.1.0

no_std, zero-allocation storage engine: block device, page manager, WAL, B-Link tree
Documentation
  • Coverage
  • 100%
    144 out of 144 items documented1 out of 92 items with examples
  • Size
  • Source code size: 111.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • tpt-solutions/tpt-archon
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • PhillipC05

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 — the BlockDevice backend abstraction with InMemoryBlockDevice, (behind the std feature) FileBlockDevice, and (behind the opt-in mmap feature) MmapBlockDevice — real OS-mmap-backed, genuinely zero-copy read access via page_ref (writes unsupported by design; see its module docs).
  • zerocopy — fixed-capacity byte buffers (FixedBuf) and little-endian, bounds-checked Cursor/Reader for page/WAL framing with no heap allocation and no serde.
  • page — a fixed-size Page plus a BufferPool with a Free/Clean/Dirty/Pinned state 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 — a StorageEngine facade wiring the BufferPool to the Wal: page writes go through the write-ahead log before main storage, and StorageEngine::recover replays 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 the tpt-telos replay-consistency harness in formal-proofs/.

No tpt-zero-bytes. That crate was never built. The zero-allocation primitives live in zerocopy on purpose — do not add a dependency on a crate by that name.

Features

  • std (default) — enables the file-backed FileBlockDevice (needs std::fs). Build with --no-default-features for a fully no_std configuration.
  • mmap — enables MmapBlockDevice (implies std). Off by default; uses the cross-platform memmap2 crate (mmap(2) on Unix, CreateFileMappingW on Windows), so no target gating is needed.

Example

cargo run -p tpt-archon-core --example storage_tour

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.