madapes

edge_storage (0.1.17)

Published 2026-03-27 05:41:58 +00:00 by vlad

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add edge_storage@0.1.17

About this package

High-performance embedded data store powered by libmdbx for edge scenarios

EdgeStorage

A high-performance, embedded data store written in Rust, powered by libmdbx. Optimized for edge scenarios: local state for event-sourcing aggregates and high-speed TTL caching.

Features

  • Core KV Store — Binary keys/values, point lookups, range scans, atomic batched writes
  • Event Sourcing — Versioned snapshots with strict monotonicity and efficient latest-state tracking
  • TTL Cache — Time-based expiration with lazy deletion and active cleanup
  • Multi-Language — Stable C-ABI with bindings for Node.js and Go

Performance

Operation Throughput Latency
KV Write (async) 1.3M ops/sec Batched (10ms)
KV Read 1.1M ops/sec 926ns
Aggregate Write 337K ops/sec Batched
Aggregate Read 1.0M ops/sec ~1μs
Cache Write 359K ops/sec Batched
Cache Read 1.5M ops/sec ~700ns

Quick Start

use edge_storage::{Config, EdgeStorage, KvStore, Writer};

fn main() -> edge_storage::Result<()> {
    let config = Config::new("./my_database.mdbx");
    let storage = EdgeStorage::open(config.clone())?;
    let writer = Writer::new(storage.db().clone(), &config);
    let kv = KvStore::new(storage.db(), &writer);

    kv.put_sync(b"hello", b"world")?;
    let value = kv.get(b"hello")?;
    println!("{:?}", value);
    Ok(())
}

Documentation

Full documentation is available on the Wiki:

Page Description
Getting Started Prerequisites, build instructions, quick start
Architecture System design, data flow, DBI schema
Configuration Rust configuration options reference
API Reference KV Store, Aggregate Store, TTL Cache APIs
Language Bindings Node.js and Go binding usage
Contributing Developer workflow, CI/CD, release process
Troubleshooting Common issues and solutions

Project Status

See ROADMAP.md for development milestones and progress.

License

MIT OR Apache-2.0

Dependencies

ID Version
crossbeam-channel ^0.5
libmdbx ^0.6
parking_lot ^0.12
query_engine ^0.1
serde_json ^1.0
thiserror ^2
criterion ^0.5
tempfile ^3
cbindgen ^0.28

Keywords

embedded database mdbx kv-store event-sourcing
Details
Cargo
2026-03-27 05:41:58 +00:00
70
MadApes
MIT
65 KiB
Assets (1)
Versions (8) View all
0.1.17 2026-03-27
0.1.16 2026-02-15
0.1.15 2026-02-14
0.1.14 2026-02-13
0.1.13 2026-02-11