| Crates.io | aegis-storage |
| lib.rs | aegis-storage |
| version | 0.1.7 |
| created_at | 2026-01-20 02:33:15.632951+00 |
| updated_at | 2026-01-24 03:49:35.977441+00 |
| description | Storage engine for Aegis database |
| homepage | https://automatanexus.com |
| repository | https://github.com/AutomataNexus/Aegis-DB |
| max_upload_size | |
| id | 2055683 |
| size | 128,339 |
High-performance storage engine for the Aegis Database Platform.
aegis-storage provides the core storage layer with pluggable backends, write-ahead logging, MVCC transactions, and block-level compression. It serves as the foundation for all data persistence in Aegis.
┌─────────────────────────────────────┐
│ Storage API │
├─────────────────────────────────────┤
│ Transaction Manager (MVCC) │
├─────────────────────────────────────┤
│ Buffer Pool (LRU) │
├─────────────────────────────────────┤
│ Write-Ahead Log (WAL) │
├─────────────┬───────────────────────┤
│ Memory │ Local FS Backend │
│ Backend │ │
└─────────────┴───────────────────────┘
| Module | Description |
|---|---|
backend |
Storage backend trait and implementations |
block |
Block structure and serialization |
buffer |
Buffer pool with LRU eviction |
page |
Page management and allocation |
transaction |
MVCC transaction handling |
wal |
Write-ahead logging for durability |
[dependencies]
aegis-storage = { path = "../aegis-storage" }
use aegis_storage::{StorageEngine, StorageConfig};
use aegis_storage::backend::MemoryBackend;
// Create storage engine with memory backend
let config = StorageConfig::default();
let engine = StorageEngine::new(config)?;
// Begin a transaction
let tx = engine.begin_transaction()?;
// Write data
engine.put(&tx, b"key", b"value")?;
// Commit
engine.commit(tx)?;
// Read data
let value = engine.get(b"key")?;
use aegis_storage::block::{Block, CompressionType};
// Create compressed block
let block = Block::new(data)
.with_compression(CompressionType::Lz4);
// Compression is automatic on write
engine.write_block(block)?;
[storage]
backend = "local" # "memory" or "local"
data_directory = "/var/aegis"
compression = "lz4" # "none", "lz4", "zstd"
buffer_pool_size = "1GB"
wal_enabled = true
sync_on_commit = true
cargo test -p aegis-storage
Test count: 23 tests
Apache-2.0