A minimal in-memory key-value store written in Rust, inspired by Redis.
Supports persistence, graceful shutdown, and concurrent clients via Tokio.
GET,SET,DEL,SAVE,STATScommands- Async multi-client support with
tokio - Automatic snapshot on
Ctrl+C - JSON persistence via
serde_json
cargo run
Connect with netcat:
nc 127.0.0.1 6379
Then type commands:
SET name rustacean VALUE: rustacean
GET name VALUE: rustacean
DEL name OK: Deleted
SAVE OK: Database saved to dump.json
cargo test
| Crate | Role |
|---|---|
tokio |
Async runtime |
serde_json |
JSON persistence |
anyhow |
Error handling |
colored |
Terminal colors |