| Crates.io | wavekv |
| lib.rs | wavekv |
| version | 1.0.0 |
| created_at | 2025-12-05 01:35:07.662634+00 |
| updated_at | 2025-12-05 01:35:07.662634+00 |
| description | An embeddable, eventually consistent, distributed key-value store with peer-to-peer architecture |
| homepage | https://github.com/Phala-Network/wavekv |
| repository | https://github.com/Phala-Network/wavekv |
| max_upload_size | |
| id | 1967431 |
| size | 118,272 |
WaveKV is an embeddable Rust library for building distributed key-value stores. It focuses on simplicity over completeness.
Key characteristics:
(timestamp, origin node id). Simple and deterministic.Single Source of Truth: Every mutation becomes a StateOp and is appended to a write-ahead log (WAL). Recovery replays the exact same ops.
Simple Core State: CoreState only tracks three things—KV data, peer metadata (logs + ack progress), and next_seq.
Eventual Sync: Nodes exchange incremental logs plus snapshots when peers fall behind. A background loop keeps trying until it works.
Auto Discovery: Incoming sync traffic automatically registers the sender as a peer, so a new node can simply point at any existing node and learn about the rest.
WaveKV intentionally does NOT provide:
(timestamp, origin node id).There is a filesync binary under src/bin/ that mirrors a local directory into WaveKV. It exists to exercise the replication path on a laptop. Typical workflow:
cargo build --release --bin filesync
./scripts/test-cluster.sh # launches three demo nodes inside tmux
./scripts/test-ops.sh # generates local file churn
The scripts configure a minimal chain of --peers flags so you can watch nodes auto-discover each other via the shared KV store. Feel free to ignore this section if you only care about the embedded library.
Apache License Version 2.0 – see LICENSE for full text.