O(1) Copy-on-Write Branches
Shares unchanged documents and secondary indexes from a template database across hundreds of isolated branches in one process.
One element. Thousands of isolated atoms.
Open sourceAGPL-3.0Pure Rust
MongoDB-compatible local server with O(1) copy-on-write database branches and auto-expiring TTLs. One process, hundreds of branches, no Docker.
curl -fsSL https://raw.githubusercontent.com/nhrbuilds/kryptondb/main/install.sh | bashShares unchanged documents and secondary indexes from a template database across hundreds of isolated branches in one process.
Speaks OP_MSG 2013 over TCP or local socket so mongosh and existing MongoDB drivers connect without wrappers.
Set --ttl 30m or --ttl 2h so abandoned test or AI agent branches expire automatically while active work stays alive.
Supports secondary indexes, multi-document transactions, $changeStream, GridFS, Decimal128, and TTL indexes for supported commands.
Enforce --mem-limit-db, --mem-limit-runtime, and --rss-limit-mb ceilings so runaway suites never exhaust host RAM.
Built in pure Rust with checksum-verified installers for Linux, macOS, and Windows - no container daemon needed.
Local branch fan-out lifecycle measured on a 10,000-document fixture with tenant_1 index vs standalone MongoDB 8.3.9 ($out + index copy).
Median of 3 runs · branch creation + write + cleanup
| Branches | Backend | Create | Total |
|---|---|---|---|
| 1 | KryptonDB | 0.64 ms | 5.12 ms |
| 1 | MongoDB | 36.62 ms | 41.39 ms |
| 10 | KryptonDB | 2.57 ms | 39.48 ms |
| 10 | MongoDB | 105.5 ms | 138.53 ms |
| 100 | KryptonDB | 22.71 ms | 379.35 ms |
| 100 | MongoDB | 1196.94 ms | 1537.21 ms |
Total elapsed time and process RSS delta per fan-out
Same-host evidence on Linux (KryptonDB 1.0.0 vs mongod 8.3.9 with PyMongo 4.18.2); not a general MongoDB throughput claim or production capacity guarantee.
kryptondb branch prints a standard mongodb:// connection string you hand straight to mongosh, Node.js, Python, Go, or Rust drivers.
BRANCH_URI="$(kryptondb branch app test-1 --ttl 30m)"Prebuilt binaries for Linux, macOS, and Windows PowerShell - no Docker or Rust toolchain required.
#!/usr/bin/env bash
set -euo pipefail
# Spin up an isolated branch per parallel test worker or agent
branch="worker-${TEST_WORKER_ID:-01}-$$"
uri="$(kryptondb branch app "$branch" --ttl 30m)"
cleanup() {
kryptondb drop "$branch" >/dev/null 2>&1 || true
}
trap cleanup EXIT
MONGODB_URI="$uri" npm testVoluntary backing only. Approved manually before listing. Dollar amounts stay private.
No public sponsors yet - be the first supporter below.
Medium logo card & link while active, then permanent credit.
| Tier | Monthly | Yearly | One-Time | Placement Duration |
|---|---|---|---|---|
| Gold Sponsor | $250+ / mo | $2,500+ / yr | $500+ once | Large logo card + tagline + link while active (or 180 days for one-time), then permanent supporter credit. |
| Silver Sponsor | $50+ / mo | $500+ / yr | $100+ once | Medium logo card + link while active (or 90 days for one-time), then permanent supporter credit. |
| Bronze Backer | $15+ / mo | $150+ / yr | $25+ once | Compact badge + link while active (or 30 days for one-time), then permanent supporter credit. |
| Supporter | $5–$14 / mo | $5–$149 / yr | $5–$24 once | Listed directly in the permanent compact supporters strip with name and link. |
Sponsorships fund ongoing maintenance, testing, and documentation. They do not buy custom features, SLAs, or priority roadmap control.
Every sponsorship enters review first and is never auto-published. We reserve the right to decline sponsors whose business conflicts with our ethical standards.
Dollar amounts and contact emails are never shown publicly. Only your chosen display name, optional tagline, logo, and URL appear.
Recurring sponsorships stop featured placement when cancelled (moving to permanent credit if kept). Declined or admin-refunded entries receive a refund net of payment processor fees.
Synced from CHANGELOG.md.
install.sh, install.mjs, and install.ps1 download release assets and verify their .sha256 sidecars before installing.CODE_OF_CONDUCT.md, issue and pull request templates, and CODEOWNERS for public contribution workflows.1.0.0 across the workspace, crate path dependencies, the npm package, and the README. The prior 0.1.0-beta.1 docs, roadmap, and support table now describe the 1.0.0 line.mongodb 3.x driver. Its patched rustls 0.23 dependency clears the TLS advisories the 2.8 driver carried; cargo audit reports no vulnerabilities.AGPL-3.0-only in the workspace and npm manifests.$toArray, $toObject, $toUUID, $tsSecond, $tsIncrement, $createObjectId, $hash, $hexHash and $toHashedIndexKey, with mongod 8.3.9's probed values, null rules and error messages. Query predicate $sampleRate completes the P2 operator set.$changeStream.showExpandedEvents emits DDL events (create, createIndexes, dropIndexes, modify) with mongod 8.3.9's probed operation descriptions, in collection, database and cluster streams.$text tokenization is mongod's own: the Unicode 8.0.0 delimiter property set (White_Space, Dash, Hyphen, Quotation_Mark, Terminal_Punctuation, Pattern_Syntax, STerm, apostrophe except English) and the generated diacritic map, including pure combining marks and non-Diacritic Mn code points.$setWindowFields operators $expMovingAvg (N and alpha forms), $linearFill, $minMaxScaler and window $setUnion, plus $meta: "sortKey" / "indexKey" projections with mongod's shapes and errors.moreToCome requests suppress the reply, exhaustAllowed (bit 16) streams tailable getMore batches flagged moreToCome, and checksumPresent is echoed only when requested and verified on input (CRC-32C).$collStats, $indexStats, $planCacheStats, $listSessions, $listLocalSessions, $listCatalog, $listClusterCatalog, $listSampledQueries, $querySettings, $queryStats, $currentOp, with mongod's namespace rules and honest empty shapes where KryptonDB keeps no such state.$rankFusion (weighted RRF over subpipelines), $score/$scoreFusion metadata handling, and $changeStreamSplitLargeEvent: events over 16 MiB fragment into metadata/fullDocument, fullDocumentBeforeChange and updateDescription parts with distinct resume tokens, and the stage must be last (7182802).bulkWrite, mapReduce (boa-backed map/reduce/finalize), listCommands, convertToCapped, cloneCollectionAsCapped, filemd5, dataSize, dbHash, hostInfo, getLog, getCmdLineOpts, validateDBMetadata, top, profile, lockInfo, connPoolStats, currentOp, killOp, setParameter, get/setDefaultRWConcern, setFeatureCompatibilityVersion, setIndexCommitQuorum and shutdown. serverStatus reports real process uptime (uptime/uptimeMillis since start, MiB memory) and collStats carries capped options, indexSizes, totalIndexSize, totalSize, scaleFactor, numOrphanDocs and freeStorageSize.find options returnKey, showRecordId ($recordId), noCursorTimeout, allowDiskUse and the deprecated oplogReplay, matching mongod 8.3.9's probed shapes.fsync/fsyncUnlock with a real global write lock (writers wait, reads run, nested lock counts), dropConnections, logRotate, rotateCertificates, autoCompact, setUserWriteBlockMode (standalone's code 20), get/setClusterParameter (code 4 for every name), planCacheSetFilter/planCacheListFilters/planCacheClearFilters/planCacheClear with mongod's filter shape and exact validation errors, and setQuerySettings/removeQuerySettings with 8.3.9's IDL type checks and hash-parser replies. getAuditConfig, setAuditConfig, serverInfo, shardConnPoolStats and getQuerySettings are NOT commands on mongod 8.3.9 (probed 59), so they stay CommandNotFound.$sin … $radiansToDegrees), $sigmoid, $indexOfBytes/$indexOfCP, $replaceOne, with mongod 8.3.9's probed values, null rules, error codes and messages.$sum/$avg lanes.OP_MSG 2013 server (OP_QUERY handshake, hello/isMaster/buildInfo/ping).im::OrdMap + HashMap in crates/kryptondb-core), forkDatabase O(1) branching, per-DB sharding.insert/find/update/delete/count/distinct/aggregate/getMore/killCursors with sort/projection/cursor pagination and single-field secondary indexes (createIndexes/listIndexes).findAndModify with new, upsert, remove, sort, projection and driver-shaped reply.Router: TCP, UDS and the dashboard now use one process-wide engine, cursor store and watch registry.watch: $changeStream at collection or database level, driver-shaped ns, operationType, updateDescription, document resumeAfter tokens, postBatchResumeToken, invalidate, and tailable getMore with maxTimeMS.readConcern: {level: "snapshot"} + lsid: one atomic pin of all DBs per session.WriteConflict (112, TransientTransactionError) on concurrent writes, transaction-owned cursors closed on commit/abort, 60s janitor abort of abandoned transactions.BadValue (2); $nor, $all, $size, $elemMatch (document and operator forms), $regex with $options, $type, and field-level $not. Unsupported operators are rejected instead of silently matching nothing.$set/$unset/$inc/$mul/$min/$max/$rename/$currentDate/$push/$addToSet/$pop/$pull/$pullAll/$bit, plus $setOnInsert. Modifiers ($each/$slice) and query-operator $pull are rejected explicitly. _id is immutable under every update operator and pipeline form (ImmutableField, 66).expireAfterSeconds) and TTL branches (forkDatabase ttlMillis, branch --ttl), runtimeStatus.capped/size/max, 256B floor, synchronous FIFO eviction).fs.files/fs.chunks, 256KB chunks, auto-create siblings + files_id index).run --mem-limit-db/--mem-limit-runtime/--rss-limit-mb, OutOfMemory (53200) on inserts and updates; per-collection 100MB hard ceiling.branch/ls [--json]/url, fork --ttl, parse_ttl (2h/5m/30s/1d), bench.aggregate wide stage count: $group accumulators $sum/$count/$avg/$min/$max/$first/$last/$push/$addToSet, $count, $unwind, $addFields, $replaceRoot; unknown stages 40324.--no-socket and --port 0, graceful SIGINT/SIGTERM shutdown with UDS cleanup..sha256 sidecars; install.sh, install.mjs and install.ps1 verify them before installing.SECURITY.md, docs/readiness.md, BRAND.md.insert_prepared_batch): index options listed once, BSON sizes computed once per doc.estimated_bytes is maintained on every write (total_bytes) instead of rescanning documents.n:1, nModified:0, upserted:[{index, _id}]; a matched update returns n:1, nModified:1.lsid/$db-first dispatch, endSessions, and killCursors work across all transports.getMore no longer returns nextBatch for a different namespace.OrdSet buckets); find count matches docs not keys; updates move entries.Double(1.0) vs Int64(4607182418800017408) collision gone; unified IEEE-754 ordering -2 < -1.5 < 0 < 1 < 1.5 < 2; Int32/Int64/Double cross-type equality holds.sort+skip+limit sorts then pages on both indexed and scan paths; Double(-1.0) is descending.drop collection executes (was a no-op); unknown commands → CommandNotFound (59); $db/lsid-first dispatch honors.>10k aggregates/counts via find_all_documents; distinct uncapped.OP_GET_MORE/OP_KILL_CURSORS round-trip; unknown opcodes emit an error frame (not a silent close).simultaneous race + upsert onto a missing DB now creates; GridFS chunk div_ceil + join ordering fixed.commitTransaction/abortTransaction without a session return FailedToParse (9); unknown or stale transactions return NoSuchTransaction (251) instead of the non-standard TransactionTooHard.No. KryptonDB is built specifically for temporary local development, automated tests, CI jobs, and AI coding agents. It implements a subset of MongoDB wire commands, runs in memory by default, and has no authentication or TLS.
A template database holds your starting data and indexes. Running kryptondb branch <template> <name> sends forkDatabase to create a lightweight view (im::OrdMap + HashMap) that shares unchanged state with the template and only allocates memory where writes diverge.
No. Prebuilt single-file release binaries install with one shell or PowerShell command and verify their .sha256 checksums. Connect with mongosh or any existing MongoDB driver over mongodb://127.0.0.1:27017/<branch>.
All sponsorships go through Whop and enter manual review before appearing publicly. Monthly and yearly sponsors stay in their tier slot while active; one-time sponsors receive a fixed featured window (30, 90, or 180 days by tier) before moving into the permanent compact supporters list.