SQLiteGraph
Embedded graph database with dual backend architecture.
Positioning: Single-binary embedded database (no server). Persistent storage with atomic batch commits. Graph algorithms + HNSW vector search in one engine. SQLite: stable, mature, excellent for adjacency queries. V3: high-performance, unlimited scale, faster for bulk traversals. See benchmarks below.
Backends
| Feature | SQLite | Native V3 |
|---|---|---|
| Status | Stable | Stable |
| Storage | .db file |
.graph file |
| Max nodes | Unlimited | Unlimited |
| Graph algorithms | 35+ | 35+ |
| HNSW vectors | Yes | Yes |
| Pub/Sub | Yes | Yes |
| LRU Cache | No | Yes (v2.1.0) |
| Parallel BFS | No | Yes (v2.1.1) |
Benchmarks
See docs/ARCHITECTURE.md for architecture details.
Quick Summary (v2.1.1 - VERIFIED):
- Point lookup: V3 114× faster with LRU cache (warm vs cold cache)
- Bulk traversal: V3 10-20× faster (contiguous storage)
- Adaptive pages: 15-25% faster (SSD/HDD auto-detection, verified)
- Delta encoding: 75-87% space savings (exceeds 42% claim)
- Parallel BFS: Thread-safe chunked processing, 1.0-1.17× speedup on small graphs (100-500 nodes)
Run benchmarks yourself:
See examples/ for reproducible performance tests.
Quick Start
[]
# SQLite backend (default)
= "2.1"
# OR Native V3 backend (faster traversals)
= { = "2.1", = ["native-v3"] }
use ;
use SqliteGraphBackend;
CLI
# Query (read-only by default)
# Algorithms
Ecosystem
Tools built on SQLiteGraph:
| Tool | Purpose | Repository | crates.io |
|---|---|---|---|
| Magellan | Code graph indexing, symbol navigation | github.com/oldnordic/magellan | crates.io/crates/magellan |
| llmgrep | Semantic code search | github.com/oldnordic/llmgrep | crates.io/crates/llmgrep |
| Mirage | CFG analysis, path enumeration | github.com/oldnordic/mirage | crates.io/crates/mirage-analyzer |
| splice | Precision code editing | github.com/oldnordic/splice | crates.io/crates/splice |
Documentation
- Architecture - System design
- Manual - API guide
- Changelog - Version history
License
GPL-3.0-or-later