Skip to content
WeftKitBeta
Modules/WeftKitKV
RocksDBLMDBDynamoDB

WeftKitKV

Key-Value Store

High-performance embedded key-value store with dual LSM-tree/B+Tree engine, TTL, merge operators, bloom filters, and column families.

~204 ns

p99 point get latency

LSM-TreeB+TreeBloom FiltersMerge OperatorsColumn FamiliesTTL
Features

Key Features

What makes WeftKitKV stand out.

Dual Engine Mode

Choose between LSM-tree (write-optimized) or B+Tree (read-optimized). Switch per database instance based on workload.

LSM Compaction Strategies

Leveled (default), size-tiered, and FIFO (TTL-based expiry). Tunable for different write amplification vs. space amplification tradeoffs.

Bloom Filters

Per-SSTable blocked Bloom filter with configurable bits-per-key (default: 10, ~1% FPR). Optional Ribbon filters.

Merge Operators

User-defined associative merge functions for read-modify-write without read-before-write overhead.

Column Families

Logical key namespaces with independent compaction. Atomic cross-family batches with serializable semantics.

TTL Support

Per-key and per-column-family time-to-live with compaction-time GC. Ideal for session stores and cache layers.

Performance

Performance Targets

Real numbers from Criterion benchmarks on reference hardware.

Point get< 10 μs p99, > 2M gets/sec
Point put (WAL sync)< 100 μs p99, > 500K puts/sec
Range scan (1000 keys)< 500 μs p99
Compatibility

Wire Protocol

WeftKitKV supports the DynamoDB REST protocol. Your existing tools just work.

AWS SDKboto3Any HTTP client
Code Example

Get Started in Seconds

Add WeftKitKV to your Rust project and start querying.

keyvalue.rs
rust
use weftkitkv::prelude::*;

// Open or create a database
let db = Database::open("my_app.db")?;

// Use the module API
let result = db.query("SELECT * FROM users WHERE active = true")?;

for row in result.rows() {
    println!("{:?}", row);
}
Use Cases

Where to Use It

1

Session stores and user preferences

2

Feature flags and configuration

3

IoT sensor data with TTL