SecantusDB Rust MongoDB server
SecantusDB's flagship server: written in Rust from the wire up — dispatch, cursors, change streams, and WiredTiger storage — with no interpreter anywhere in the request path. One standalone binary, the MongoDB wire protocol, and thirteen unmodified driver test suites deciding whether it is right.
What you get
This is the server to run. The pure-Python implementation it grew out of is still the project's reference — the readable one, the one every operator lands in first — and this is that same database with the interpreter taken out from under it.
One standalone binary
The Rust server ships as a single executable with WiredTiger statically linked — secantusd-rs. No interpreter, no virtualenv, no system Mongo, and since 0.5.3-beta.165 no shared libraries beyond the platform's own C runtime: zlib and lz4, WiredTiger's block compressors, are linked in. Drop it in a container or a CI image and run. Every release is checked against that claim before it is published.
No Python in the request path
Wire parsing, command dispatch, cursors, the operator engines, and storage are all pure Rust. The GIL never touches a query, and the accept loop runs on a native thread.
Same wire protocol
It answers the same OP_MSG handshake, CRUD, aggregation, and change-stream commands. Every driver that talks to the Python server talks to the Rust server unchanged.
Same conformance bar
The unmodified driver-conformance gauges run against the Rust server too — the same upstream suites the driver maintainers run against a real mongod. It passes 99.5% of pymongo's own test suite, level with the Python server; the feature comparison maps both servers against real MongoDB, feature by feature.
Real WiredTiger storage
The same C storage engine MongoDB ships with, linked into the binary. B-trees, durability, write-ahead logging — identical on-disk semantics to the Python server.
Embeddable from Python too
A thin lifecycle handle (start / stop / address) runs the Rust accept loop in-process on a GIL-released thread; pymongo connects over real TCP. Launch it from a test, get a Rust server.
There is a SQL server too
The same Rust storage answers the PostgreSQL wire protocol in a second binary, so psql, psycopg and SQLAlchemy are an option on the same on-disk format. Newer, and early access.
Measured, not promised
Nine workloads, median of five runs, end to end through pymongo on on-disk WiredTiger, with a real mongod 8.0.32 as the reference — all three on a dedicated 8-vCPU cloud instance, because a laptop cannot be trusted for this. The Rust server runs at 1.0×–3.5× of mongod per operation, and ~1.8×–13.1× faster than the Python reference workload for workload.
| Workload | mongod | Rust server | x mongod |
|---|---|---|---|
| insert (10k docs) | 79.6 ms | 152.8 ms | 1.9x |
| find indexed range | 9.4 ms | 10.1 ms | 1.1x |
| find full scan | 18.2 ms | 18.4 ms | 1.0x |
| find filtered scan | 14.5 ms | 16.4 ms | 1.1x |
| update_many (half) | 91.8 ms | 134.0 ms | 1.5x |
aggregate $group | 12.2 ms | 23.1 ms | 1.9x |
| aggregate multi-stage | 14.3 ms | 50.0 ms | 3.5x |
| delete_many (half) | 42.7 ms | 88.1 ms | 2.1x |
| change-stream drain | 107.5 ms | 120.4 ms | 1.1x |
Full scan sits at parity with mongod, with indexed range, filtered scan and the change-stream drain a shade behind at 1.1x. The gaps left are dispatch and operator work — aggregation (1.9–3.5x), delete_many (2.1x) and insert (1.9x) — above a storage engine that is literally the same C library mongod links. Every number includes the wire and driver overhead a real client pays. All three servers, latency and concurrency →
Get it
Two ways to run the Rust server — bundled in the Python package, or as a prebuilt standalone binary.
Bundled in the wheel
The secantus wheel ships the Rust server as the secantusd-rs command, alongside the pure-Python secantusd-py.
pip install SecantusDB
secantusd-rs --port 27017 --storage-path ./data
Standalone binary
Prebuilt static-WiredTiger archives are published on GitHub Releases (Linux x86_64, macOS arm64 and Windows x86_64) — no Python at all. The Linux archive needs only glibc; the macOS one only the system frameworks; the Windows one links the C runtime statically, so it needs no Visual C++ redistributable. That is not a hope — the release reads each binary's own dependency table and refuses to publish an archive that reaches outside it. Look for the secantusdb-v<version> tags; each archive ships with a .sha256 checksum.
# download + extract from the releases page,
# then run the secantusd-rs binary:
./secantusd-rs --port 27017 --storage-path ./data
How it differs from the Python reference
Same database, same wire protocol, same storage on disk. Run this one; read the other one.
| Python reference | Rust MongoDB server | |
|---|---|---|
| Request path | Pure Python | Pure Rust |
| Reach for it when | You want to read, patch or extend the engine | You want to run it — anywhere, fast, with nothing installed |
| How you run it | pip install SecantusDB → SecantusDBServer(...) | secantusd-rs binary (bundled in the wheel or from Releases) |
| Python required at runtime | Yes | No |
| Storage engine | WiredTiger | WiredTiger |
| Wire protocol & drivers | MongoDB OP_MSG — all drivers | MongoDB OP_MSG — all drivers |
| Embeddable in Python | Native (in-process) | Yes — in-process on a GIL-released thread |
Rust-server documentation: Installation · Running the daemon · Embedded in Python · Backup & PITR · Conformance · Feature comparison