Grafeo is a pure-Rust, high-performance graph database that can be embedded as a library or run as a standalone database, with optional in-memory or persistent
Grafeo is a pure-Rust, high-performance graph database that can be embedded as a library or run as a standalone database, with optional in-memory or persistent
Grafeo is a graph database built in Rust from the ground up for speed and low memory use. It runs embedded as a library or as a standalone server, with in-memory or persistent storage and full ACID transactions.
In our graph-bench suite (which includes workloads inspired by the LDBC Social Network Benchmark), Grafeo is the fastest tested graph database in both embedded and server configurations, while using a fraction of the memory of some of the alternatives. Grafeo supports both Labeled Property Graph (LPG) and Resource Description Framework (RDF) data models and all major query languages.
Features
Value::Vector(Arc) stored alongside graph datarecompact() to mergeencryption feature): AES-256-GCM for WAL records and .grafeo sections, password-based (Argon2id) or raw-key setupAdmin, ReadWrite, ReadOnly roles enforced across all six query languagesshacl feature): W3C Shapes Constraint Language with all 28 Core constraint types and SHACL-SPARQLmax_elements boundbackup_full, backup_incremental, restore_to_epochmetrics feature): query, transaction, session, cache, and GC counters with text exportasync-storage feature): non-blocking WAL and snapshot I/O via tokiotracing feature): opt-in observability spans and eventsBenchmarks
Tested with graph-bench, which includes workloads inspired by the LDBC Social Network Benchmark. These are not official LDBC Benchmark results (see disclaimer).
Embedded (SF0.1, in-process):
| Database | SNB Interactive | Memory | Graph Analytics | Memory |
|---|---|---|---|---|
| Grafeo | 2,904 ms | 136 MB | 0.4 ms | 43 MB |
| LadybugDB(Kuzu) | 5,333 ms | 4,890 MB | 225 ms | 250 MB |
| FalkorDB Lite | 7,454 ms | 156 MB | 89 ms | 88 MB |
Server (SF0.1, over network):
| Database | SNB Interactive | Graph Analytics |
|---|---|---|
| Grafeo Server | 730 ms | 15 ms |
| Memgraph | 4,113 ms | 19 ms |
| Neo4j | 6,788 ms | 253 ms |
| ArangoDB | 40,043 ms | 22,739 ms |
Full results: embedded | server
| Query Language | LPG | RDF |
|---|---|---|
| GQL | ✅ | - |
| Cypher | ✅ | - |
| GraphQL | ✅ | ✅ |
| Gremlin | ✅ | - |
| SPARQL | - | ✅ |
| SQL/PGQ | ✅ | - |
Grafeo uses a modular translator architecture where query languages are parsed into ASTs, then translated to a unified logical plan that executes against the appropriate storage backend (LPG or RDF).
cargo add grafeoGrafeo uses persona-based feature profiles that describe use cases. Compose them freely:
…| Profile | Contents | Use case |
|---|---|---|
lpg |
GQL, AI, algorithms, parallel | Default for libraries and apps |
rdf |
SPARQL, triple-store, ring-index | Knowledge graphs, linked data |
analytics |
Algorithms, parallel | Graph analytics pipelines |
ai |
Vector, text, hybrid search, CDC | RAG, semantic search |
edge |
GQL, compact, regex-lite | WASM, resource-constrained |
enterprise |
Metrics, tracing, async I/O | Platform operators, observability |
npm install @grafeo-db/jsgo get github.com/GrafeoDB/grafeo/crates/bindings/gonpm install @grafeo-db/wasmdotnet add package Grafeo# pubspec.yaml
dependencies:
grafeo: ^0.5.42pip install grafeo
# or with uv
uv add grafeoWith CLI support:
pip install grafeo[cli]
# or with uv
uv add grafeo[cli]………use grafeo::GrafeoDB;
fn main() {
// Create an in-memory database
let db = GrafeoDB::new_in_memory();
// Or open a persistent database
// let db = GrafeoDB::open("./my_database").unwrap();
// Execute GQL queries
db.execute("INSERT (:Person {name: 'Alix'})").unwrap();
let result = db.execute("MATCH (p:Person) RETURN p.name").unwrap();
for row in result.rows() {
println!("{:?}", row);
}
}…Optional admin CLI for operators and DevOps:
…| Project | Description |
|---|---|
| grafeo-server | HTTP server & web UI: REST API, transactions, single binary (~40MB Docker image) |
| grafeo-web | Browser-based Grafeo via WebAssembly with IndexedDB persistence |
| gwp | GQL Wire Protocol: gRPC wire protocol for GQL (ISO/IEC 39075) with client bindings in 5 languages |
| boltr | Bolt Wire Protocol: pure Rust Bolt v5.x implementation for Neo4j driver compatibility |
| grafeo-langchain | LangChain integration: graph store, vector store, Graph RAG retrieval |
| grafeo-llamaindex | LlamaIndex integration: PropertyGraphStore, vector search, knowledge graphs |
| grafeo-mcp | Model Context Protocol server: expose Grafeo as tools for LLM agents |
| grafeo-memory | AI memory layer for LLM applications: fact extraction, deduplication, semantic search |
| anywidget-graph | Interactive graph visualization for Python notebooks (Marimo, Jupyter, VS Code, Colab) |
| anywidget-vector | 3D vector/embedding visualization for Python notebooks |
| playground | Interactive browser playground: query in 6 languages, visualize graphs, explore schemas |
| graph-bench | Benchmark suite comparing graph databases across 65 LDBC-inspired and custom benchmarks |
| ann-benchmarks | Fork of ann-benchmarks with a Grafeo HNSW adapter for vector search benchmarking |
Full documentation is available at grafeo.dev.
See CONTRIBUTING.md for development setup and guidelines.
Thank you to the people and organizations supporting Grafeo's development:
Grafeo's execution engine draws inspiration from:
Apache-2.0
No open issues yet, or sync has not completed.