WeftKitRel
Relational SQL Database
Full-featured embedded SQL database with a cost-based optimizer, MVCC, B+Tree indexes, and vectorized analytics. Superior to SQLite for OLTP workloads.
simple SQL parse latency
Key Features
What makes WeftKitRel stand out.
SQL:2016 Core Subset
Hand-written recursive-descent parser supporting SELECT, INSERT, UPDATE, DELETE, CTEs, views, stored procedures, and triggers.
Cost-Based Optimizer
Selinger-inspired optimizer with histogram statistics, join reordering for up to 12 tables, predicate pushdown, and covering index detection.
MVCC with Snapshot Isolation
Multi-Version Concurrency Control with READ COMMITTED, REPEATABLE READ, and SERIALIZABLE isolation. Readers never block writers.
Multiple Index Types
B+Tree (default), hash index, partial indexes, expression indexes, composite indexes (up to 16 columns), and BRIN for ordered data.
HOT Updates
Heap-Only Tuple updates for modifications that do not change indexed columns — avoids index updates entirely, reducing write amplification.
Vectorized Execution
1024-row batch execution for analytical queries. Over 1 GB/sec throughput in vectorized mode.
Performance Targets
Real numbers from Criterion benchmarks on reference hardware.
Wire Protocol
WeftKitRel supports the PostgreSQL v3 protocol. Your existing tools just work.
Get Started in Seconds
Add WeftKitRel to your Rust project and start querying.
use weftkitrel::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);
}Where to Use It
Mobile offline-first apps
Embedded analytics on device
IoT device configuration store