v0.1.0 โ€” Beta

Your MongoDB
drop-in replacement,
powered by SQLite.

One tiny binary. Zero infrastructure. MongoDB wire protocol โ€” compatible with mongosh, mongodump, and popular MongoDB drivers.

โ†“ Download Learn more โ†’

โœ… Full CRUD, 17 aggregation stages, 40+ expression operators, SCRAM-SHA-256/1 auth, TLS

~8 MB
Single binary size
0
External dependencies at runtime
17
Aggregation stages supported

Everything you expect,
nothing you don't.

Built in Rust on Tokio. Full MongoDB wire protocol with a SQLite engine โ€” no replica sets, no cluster orchestration, no ops burden.

โšก

Full CRUD

insertOne, insertMany, find, findOne, updateOne/Many, deleteOne/Many, findAndModify, count, distinct, bulk writes โ€” all supported.

๐Ÿ”—

Aggregation Pipeline

$match, $sort, $group (all accumulators), $lookup, $unwind, $project, $facet, $out, $addFields, $sample, $replaceRoot, $sortByCount, $unset, $replaceWith, $count, $regexMatch, and 40+ expression operators. All accumulators and expressions are type-safe โ€” Int32/Int64/Double handled correctly.

๐Ÿ“

Index Management

Create single, compound, and unique indexes. List, drop, and index-backed query execution โ€” all through standard MongoDB commands.

๐Ÿ”’

Auth & Authorization

SCRAM-SHA-256 and SCRAM-SHA-1 authentication. Role-based access control with root, readWrite, and read roles. User management via createUser, updateUser, dropUser.

๐Ÿ”

TLS Encryption

Built-in TLS support via rustls (pure Rust, no OpenSSL). Enable with --tls flag. Generate self-signed certs with make tls-certs or bring your own CA-signed certs. All wire protocol traffic encrypted.

๐Ÿ—„๏ธ

SQLite Backend

Every database is a single SQLite file. WAL mode, synchronous NORMAL, foreign keys โ€” fast, reliable, zero-config persistence with no daemon tuning.

๐Ÿงฉ

Wire Protocol Parity

OP_MSG, OP_QUERY, OP_GET_MORE, OP_KILL_CURSORS, document sequences, checksum parsing โ€” maxWireVersion 21 (MongoDB 8.0+).

๐Ÿ› ๏ธ

Tool Compatible

Works with mongosh, mongodump, mongorestore, pymongo (with note), and any MongoDB driver speaking OP_MSG. Drop-in, zero migration.

๐Ÿ“Š

DB & Collection Ops

createCollection, drop, dropDatabase, listDatabases, listCollections, collStats, dbStats โ€” full database and collection lifecycle management.

๐Ÿชถ

Low-Resource Devices

Runs on as little as 32 MB RAM and a single core. Ideal for Raspberry Pi, edge gateways, VPS micro-instances, and embedded Linux โ€” a full MongoDB-compatible server at a fraction of the cost.

Works with your existing tools.

Zero-config drop-in โ€” point your application at d4m and go.

mongosh
โœ… Verified
mongodump
โœ… Verified
mongorestore
โœ… Verified
pymongo 4.x
โš ๏ธ See note
MongoDB Drivers
โœ… OP_MSG
SCRAM-SHA-256
โœ… Supported

โš ๏ธ pymongo 4.17+ C-level encoder strips $-prefixed keys in arrays; use mongosh or raw BSON for aggregates. All other operations work.

๐Ÿ”ง Note on type safety: The bson crate's accessor methods match exact types only (Int32(5).as_i64() returns None). d4m uses type-safe helpers throughout the aggregation engine โ€” all numeric operators, accumulators, and $regex handle Int32, Int64, and Double correctly.