Expand description
EdgeStore — local-first embedded KV + vector database.
Engine is the primary API. It is synchronous and has no runtime dependency.
Use it directly in CLI tools, tests, and embedded contexts.
For async runtimes, wrap Engine in Arc<RwLock<Engine>> and call your
runtime’s spawn_blocking equivalent. The convenience crate edgestore-tokio
does exactly this for tokio — it adds no logic beyond that wrapper.
HTTP transport lives in edgestore-repl.
§Public API Surface
| Type | Item | Description |
|---|---|---|
| Engine | Engine | Main KV engine (open, get, put, delete, range, prefix, flush, snapshot, compact) |
| Config | EdgestoreConfig | Database configuration |
| Error | EdgestoreError | All error variants |
| Transaction | Transaction | Multi-record atomic batch |
| Metrics | MetricsSnapshot | Point-in-time metrics snapshot |
| Vector | VectorEngine trait, VectorRecord, Dtype, Metric | Vector storage & search |
| Text | [TextEngine] trait, [TextSearchResult], [SearchOptions] | Full-text search |
| Snapshot | Snapshot, SnapshotRegistry | Point-in-time reads |
| Replication | ReplicationProtocol, HostId, SegmentRef | Pull-only sync |
| Storage | StorageBackend, DefaultStorageBackend, MemoryStorageBackend | Pluggable I/O |
| Compaction | Compactor, CompactionStats | Deathtime-cohort compaction |
| Merkle | RangeMerkleTree | Anti-entropy probe |
| Immutable | ImmutableEngine, InMemorySegmentReader | Read-only in-memory engine for serverless / WASM |
Re-exports§
pub use compactor::CompactionStats;pub use compactor::Compactor;pub use config::EdgestoreConfig;pub use engine::BudgetedScan;pub use engine::Engine;pub use engine::ImportResult;pub use engine::QueryStats;pub use engine::RangePage;pub use engine::ScanBudget;pub use error::EdgestoreError;pub use fdp_backend::FdpStorageBackend;pub use fdp_backend::MockFdpBackend;pub use immutable::ImmutableEngine;pub use merkle::RangeMerkleTree;pub use metrics::MetricsSnapshot;pub use remote_store::RemoteStore;pub use replication::HostId;pub use replication::ReplicationProtocol;pub use replication::SegmentRef;pub use replication::WatermarkResponse;pub use segment::in_memory::InMemorySegmentReader;pub use snapshot::Snapshot;pub use snapshot::SnapshotRegistry;pub use storage_backend::DefaultStorageBackend;pub use storage_backend::MemoryStorageBackend;pub use storage_backend::PlacementHint;pub use storage_backend::StorageBackend;pub use transaction::Transaction;pub use vector::api::vector_namespace;pub use vector::api::VectorEngine;pub use vector::distance::distance;pub use vector::distance::distance_scalar;pub use vector::distance::total_cmp_f32;pub use vector::distance::Metric;pub use vector::hnsw::HnswIndex;pub use vector::search::vector_page;pub use vector::search::vector_search;pub use vector::search::VectorPage;pub use vector::search::VectorSearchResult;pub use vector::types::Dtype;pub use vector::types::VectorRecord;
Modules§
- compactor
- Deathtime-cohort compaction engine.
- config
- Database configuration.
- engine
- Main KV engine.
- error
- Error types.
- fdp_
backend - FDP (Flexible Data Placement) storage backends.
- immutable
- Read-only in-memory engine for serverless / WASM environments. ImmutableEngine — read-only engine for serverless / edge / WASM environments.
- manifest
- Segment manifest (internal).
- memtable
- In-memory table trait and BTree implementation.
- merkle
- Range-level Merkle tree for anti-entropy probes. Range-level Merkle tree over 16 key-range buckets.
- metrics
- Engine metrics and snapshots.
- recovery
- WAL replay recovery (internal).
- remote_
store - Remote segment store abstraction. Trait for durable segment backends.
- replication
- Pull-only replication protocol. Pull-only replication protocol.
- segment
- Segment format, reader, writer, and store (internal).
- snapshot
- Point-in-time snapshot reads.
- storage_
backend - Pluggable storage backend trait.
- transaction
- Multi-record transaction batch.
- types
- Core types (Lsn, SegmentMeta, Compression, etc.).
- vector
- Vector storage, distance, and search (internal modules with public re-exports). Vector search API layer.
- wal
- Write-ahead log format and I/O (internal).