KinDB
AlphaEmbedded Graph Engine for Code-Aware Tools
Purpose-built. Not general-purpose.
KinDB is an embeddable graph database built in Rust for code-aware tools. It provides typed graph operations, durable snapshots, full-text retrieval, vector retrieval, and integrity verification without requiring a separate database server. It is the storage substrate that powers Kin and can also be embedded by Rust applications.
Why Build a New Graph Database?
We evaluated KuzuDB, SurrealDB, CozoDB, Neo4j, and IndraDB. None of them could do all of this at once.
Compiled Graph Reads
HashMap-based adjacency lists with compiled Rust queries. No query language parser or string interpretation sits in the read path.
Snapshot-Oriented Reads
Readers work from immutable graph state while replacement state is prepared separately, keeping the read model explicit and predictable.
Full-Text Search
Tantivy-powered full-text indexing of entity names, signatures, and file paths. Fuzzy matching with edit distance tolerance. Relevance-ranked results. All in-memory, zero disk I/O during searches.
Vector Similarity Search
Approximate nearest-neighbor retrieval is available through KinDB's vector index, so semantic similarity can participate in the same graph-backed retrieval path.
Incremental Indexing
File-level change detection uses SHA-256 hashes so changed inputs update the relevant graph and retrieval state instead of forcing an unrelated full rebuild.
Cryptographic Integrity
Merkle DAG verification with content-addressed hashing. Detect tampering at the entity, relation, or sub-graph level. O(k) verification where k is the number of nodes in the sub-graph being checked.
Architecture
Four implementation layers, each with a distinct responsibility.
Graph Engine
In-memory adjacency lists with secondary indexes (name, file, kind). Pattern matching with wildcards. BFS/DFS traversal, downstream impact analysis, and dead code detection. Parallel scanning via rayon.
Search & Vectors
Full-text and vector indexes provide complementary retrieval primitives. Embedding and ranking policy remain separate boundaries above the storage engine.
Snapshot Manager
Versioned snapshots use framed serialization, integrity checks, and explicit migration paths. Corrupt or unsupported state fails with typed errors.
Tiered Storage
Storage and reopen paths are designed to preserve graph-owned state across process boundaries while keeping format compatibility explicit.
Proof Posture
KinDB performance claims are published only with a pinned harness, corpus, hardware profile, and artifact bundle. This launch page describes the shipped engine surface without promoting floating comparison numbers.
Reproducible
Every external number must trace to exact code, data, configuration, and machine context.
Versioned
Behavioral claims follow the released engine version instead of an undated development snapshot.
Scoped
Results stay bounded to the measured operation and corpus; they are not generalized into universal speed claims.
Quick Start
# Prerequisites: Rust 1.75+
$ git clone https://github.com/firelock-ai/kin-db.git
$ cd kin-db && cargo build --release
# Run tests
$ cargo test
# Run benchmarks
$ cargo bench
How KinDB Fits
Three layers, each building on the one below.
KinDB
You are hereThe graph engine substrate. Stores entities, relationships, and indexes. Can be embedded in any Rust application.
Kin
The semantic VCS built on KinDB. Adds Tree-sitter parsing, semantic fingerprinting, token-budgeted context delivery, Git interop, and the CLI.
View Kin →KinLab
The hosted collaboration and control-plane layer above Kin. Shared semantic review, org-wide search, and coordination sit on top of the same substrate.
View KinLab →Watch the GitHub repository to get notified of new releases.
Watch on GitHub