| Crates.io | janql |
| lib.rs | janql |
| version | 0.3.1 |
| created_at | 2025-12-28 10:36:34.435502+00 |
| updated_at | 2026-01-04 08:30:29.891529+00 |
| description | JanQL is a lightweight, persistent key-value store written in Rust. |
| homepage | |
| repository | https://github.com/alejandrogonzalvo/janql |
| max_upload_size | |
| id | 2008578 |
| size | 276,684 |
JanQL is a lightweight, persistent key-value store written in Rust. It features an append-only log for durability, JSON serialization, and an in-memory HashMap for fast reads.
set, get, del.load).flush operation to compact the log.use janql::Database;
fn main() {
let mut db = Database::new("my.db");
db.set("key".to_string(), "value".to_string());
println!("{:?}", db.get("key"));
db.del("key");
}
Run the standard test suite to verify correctness:
cargo test
We use criterion for benchmarking.
Run Standard Benchmarks: Measures write, read, and load performance for 100, 1k, and 10k items.
cargo bench
Run Comparison Benchmarks:
Compares JanQL against sled (requires comparison feature).
cargo bench --features comparison
We maintain performance baselines to detect regressions.
Save a New Baseline:
To save the current performance as a named baseline (e.g., v0.1):
cargo bench -- --save-baseline v0.1
Compare Against Baseline: To compare the current code against a saved baseline:
cargo bench -- --baseline v0.1