Crate rustlite_storage

Crate rustlite_storage 

Source
Expand description

§RustLite Storage Engine

LSM-tree based persistent storage engine for RustLite.

§⚠️ Internal Implementation Detail

This crate is an internal implementation detail of RustLite.

Users should depend on the main rustlite crate instead, which provides the stable public API. This crate’s API may change without notice between minor versions.

# In your Cargo.toml - use the main crate, not this one:
[dependencies]
rustlite = "0.3"

This crate provides the storage engine for RustLite, implementing an LSM-tree (Log-Structured Merge-tree) architecture with:

  • Memtable: In-memory write buffer using BTreeMap for sorted order
  • SSTable: Immutable on-disk sorted string tables
  • Compaction: Background merging to reduce read amplification
  • Manifest: Metadata tracking for crash recovery

§Architecture

Writes → Memtable (memory) → SSTable (disk)
             ↓                    ↓
        Flush when full    Compact to lower levels

Re-exports§

pub use compaction::CompactionConfig;
pub use compaction::CompactionStats;
pub use compaction::CompactionWorker;
pub use manifest::Manifest;
pub use manifest::ManifestSSTable;
pub use memtable::Memtable;
pub use memtable::MemtableEntry;
pub use sstable::SSTableEntry;
pub use sstable::SSTableMeta;
pub use sstable::SSTableReader;
pub use sstable::SSTableWriter;

Modules§

compaction
Compaction - Background merging and level management
manifest
Manifest - Metadata about current SSTables and database state
memtable
Memtable - In-memory sorted write buffer
sstable
SSTable - Sorted String Table format and I/O

Structs§

StorageConfig
Storage engine configuration
StorageEngine
Storage engine manager
StorageStats
Storage statistics