SSD-aware, append-only storage with deathtime-cohort compaction. Built in Rust. Ships as a library. No server required.
use edgestore::{EdgestoreConfig, Engine};
let config = EdgestoreConfig::new("/tmp/mydb");
let mut db = Engine::open(config)?;
db.put(b"default", b"hello", b"world")?;
let value = db.get(b"default", b"hello")?;
// Vector search
db.vector_put(b"vec", b"doc1", 128, Dtype::F32, &vector_data)?;
let results = db.vector_search(b"vec", &query, 10, Metric::Cosine)?;
// Full-text search
db.index_text(b"docs", b"doc1", "EdgeStore is fast")?;
let hits = db.search_text(b"docs", "fast database", 5)?;
New _with_stats variants on every read API return a QueryStats struct (segments scanned, bytes scanned, items examined) — ideal for agent loops and quota enforcement.
range_budgeted / prefix_budgeted accept a ScanBudget and stop early, returning a BudgetedScan with a continuation token.
search_text_with_snippets returns context windows around matched terms for RAG / highlight display.
strip_vector_index and with_vector_stripping in edgestore-tier reclaim local disk when vector data is archived to S3.
EdgeStore bundles KV storage, vector search, full-text search, and replication into one compact embedded library.
Ordered byte keys, namespaced isolation, range scans, prefix queries. Single-writer with group commit.
put_with_ttl for time-bound records. Expired cohorts compact with zero live-data relocation.
Atomic multi-record batches. Begin, commit, rollback. WAL-backed durability with fsync group commit.
Flat SIMD scan and HNSW approximate search. Cosine, L2, dot product. f32, f16, i8 dtypes.
BM25 ranking on a merged inverted index per namespace. Incrementally updated on write. O(1) search read. English tokenization, faceting, typo tolerance (Levenshtein distance ≤ 1).
Merkle-based delta sync via edgestore-repl. Content-addressed segments (BLAKE3). HTTP + S3 transports. Optional — core works standalone.
Engine::open_readonly rejects all writes at the API level. ReplicatedEngine in edgestore-repl wires primary + replica in two lines.
AsyncTieredEngine reads hot-window data under a read lock. Concurrent readers never block behind the single writer unless an archived segment must be fetched.
_with_stats variants on every read return a QueryStats struct. Agent loops and quota systems know exactly how many bytes and segments each query touched.
range_budgeted and prefix_budgeted accept a ScanBudget (max items + max bytes) and stop early. Returns a continuation cursor for safe pagination in constrained environments.
search_text_with_snippets returns context windows around matched terms. Accurate character-offset tokenization drives highlighting and RAG context extraction.
EdgeStore uses deathtime-cohort compaction — a technique from VLDB 2026 research — to group records by their predicted invalidation time instead of size tiers.
When a cohort fully expires, compaction reclaims space with zero live-data reads or writes. This drives device write amplification toward 1.0, a 10-30x improvement over level-based LSM trees.
Read how the research shaped EdgeStoreKV + vector + text. Sync. No server.
cargo add edgestore
Thin tokio wrapper for async runtimes.
cargo add edgestore-tokio
HTTP delta sync + S3 cold archive. Optional.
cargo add edgestore-repl --features s3
Local hot cache + transparent S3 read-through when data exceeds local disk.
cargo add edgestore-tier
Admin commands: put, get, compact, export.
cargo install edgestore-cli