| Crates.io | ferris-log |
| lib.rs | ferris-log |
| version | 1.0.0 |
| created_at | 2025-10-05 05:43:48.529064+00 |
| updated_at | 2025-10-05 05:43:48.529064+00 |
| description | A key-value store |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1868665 |
| size | 124,513 |
A persistent, log-structured key-value store implemented in Rust with a friendly CLI interface. Designed for reliability and simplicity.
clap for intuitive command parsing# Clone the repository
git clone https://github.com/FabioCanavarro/Ferrislog
cd Ferrislog
# Build with Cargo
cargo build --release
# Install globally
cargo install --path .
# Setup the server in 127.0.0.1:8080
kvs-server --addr 127.0.0.1:8080
# Setup the server in 127.0.0.1:8080 with the KvEngine
kvs-server --addr 127.0.0.1:8080 --engine Kvs
# Setup the server in 127.0.0.1:8080 with Sled
kvs-server --addr 127.0.0.1:8080 --engine sled
# Set a key-value pair
kvs-client --addr 127.0.0.1:8080 set username ferris
# Get the value for a key
kvs-client --addr 127.0.0.1:8080 get username
# Output: ferris
# Remove a key
kvs-client --addr 127.0.0.1:8080 rm username
# Try to get a non-existent key
kvs-client --addr 127.0.0.1:8080 get username
# Output: Key not found
Ferrislog uses a log-structured storage model:
All operations (set, remove) are appended to a log file
An in-memory hash map tracks positions of the latest value for each key
On startup, the store rebuilds its state by replaying the log
Periodic compaction removes redundant entries to keep the log size manageable
Log Compaction: Automatically triggers when log exceeds 1024 bytes
Memory Usage: Keeps only key pointers in memory, not values
Recovery: Rebuilds state on startup by replaying the log
Multi-threaded operations for better performance
Time-to-live (TTL) for keys
Set the compaction value in kvs-address
Encryption when sending data