Skip to main content

Crate edgestore

Crate edgestore 

Source
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

TypeItemDescription
EngineEngineMain KV engine (open, get, put, delete, range, prefix, flush, snapshot, compact)
ConfigEdgestoreConfigDatabase configuration
ErrorEdgestoreErrorAll error variants
TransactionTransactionMulti-record atomic batch
MetricsMetricsSnapshotPoint-in-time metrics snapshot
VectorVectorEngine trait, VectorRecord, Dtype, MetricVector storage & search
Text[TextEngine] trait, [TextSearchResult], [SearchOptions]Full-text search
SnapshotSnapshot, SnapshotRegistryPoint-in-time reads
ReplicationReplicationProtocol, HostId, SegmentRefPull-only sync
StorageStorageBackend, DefaultStorageBackend, MemoryStorageBackendPluggable I/O
CompactionCompactor, CompactionStatsDeathtime-cohort compaction
MerkleRangeMerkleTreeAnti-entropy probe
ImmutableImmutableEngine, InMemorySegmentReaderRead-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::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).