WeftKitDoc
Document Database
Schema-flexible document database for JSON/BSON documents with secondary indexing, aggregation pipelines, and change streams. MongoDB-compatible query subset.
single document insert
Key Features
What makes WeftKitDoc stand out.
MongoDB-Compatible Query Language
$eq, $gt, $lt, $in, $regex, $exists, $elemMatch, $and, $or, $not. Dot-notation for nested document access.
Aggregation Pipeline
$match, $group, $sort, $limit, $skip, $project, $unwind, $lookup. Optimizer for predicate pushdown and stage fusion.
Secondary Indexes
Single-field, compound, and multi-key indexes on nested paths. Partial and unique indexes with BSON path navigation.
Change Streams
Tailable cursor over WAL for real-time change notification with resume tokens. Compatible with CDC ecosystem component.
Flexible Schema
Documents stored as BSON in B+Tree leaf pages, keyed by 128-bit ULID document IDs. No schema migration required.
BSON Storage Format
Length-prefixed BSON for efficient serialization and querying. Null, string, number, array, object, binary, date, and decimal128 support.
Performance Targets
Real numbers from Criterion benchmarks on reference hardware.
Wire Protocol
WeftKitDoc supports the MongoDB Wire Protocol protocol. Your existing tools just work.
Get Started in Seconds
Add WeftKitDoc to your Rust project and start querying.
use weftkitdoc::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
Product catalogs and content management
User profiles and preferences
Event sourcing and audit logs