Ruvector Graph
A graph database with Cypher queries, hyperedges, and vector search -- all in one crate.
[]
= "0.1.1"
Most graph databases make you choose: you can have relationships or vector search, a query language or raw traversals, pairwise edges or nothing. ruvector-graph gives you all of them together. Write familiar Cypher queries like Neo4j, attach vector embeddings to any node for semantic search, and model complex group relationships with hyperedges that connect three or more nodes at once. It runs on servers, in browsers via WASM, and across clusters with built-in RAFT consensus. Part of the RuVector ecosystem.
| ruvector-graph | Neo4j / Typical Graph DB | Vector DB + Custom Glue | |
|---|---|---|---|
| Query language | Full Cypher parser built-in | Cypher (Neo4j) or proprietary | No graph queries |
| Hyperedges | Native -- one edge connects N nodes | Pairwise only -- workarounds needed | Not applicable |
| Vector search | HNSW on every node, semantic similarity | Separate plugin or not available | Vectors only, no graph structure |
| SIMD acceleration | SimSIMD hardware-optimized ops | JVM-based | Varies |
| Browser / WASM | default-features = false, features = ["wasm"] |
Server only | Server only |
| Distributed | Built-in RAFT consensus + federation | Enterprise tier (paid) | Varies |
| Cost | Free, open source (MIT) | Community or paid license | Varies |
Key Features
| Feature | What It Does | Why It Matters |
|---|---|---|
| Cypher Engine | Parse and execute Cypher queries -- MATCH (a)-[:KNOWS]->(b) |
Use a query language you already know instead of raw traversal code |
| Hypergraph Model | Edges connect any number of nodes, not just pairs | Model meetings, co-authorships, reactions -- any group relationship -- natively |
| Vector Embeddings | Attach embeddings to nodes, run HNSW similarity search | Combine "who is connected to whom" with "what is semantically similar" |
| Property Graph | Rich JSON properties on every node and edge | Store real data on your graph elements, not just IDs |
| Label Indexes | Roaring bitmap indexes for fast label lookups | Filter millions of nodes by label in microseconds |
| SIMD Optimized | Hardware-accelerated distance calculations via SimSIMD | Faster vector operations without changing your code |
| Distributed Mode | RAFT consensus for multi-node deployments | Scale out without bolting on a separate coordination layer |
| Federation | Cross-cluster graph queries | Query across data centers as if they were one graph |
| Compression | ZSTD and LZ4 for storage | Smaller on disk without sacrificing read speed |
| WASM Compatible | Run in browsers with WebAssembly | Same graph engine on server and client |
Installation
[]
= "0.1.1"
Feature Flags
[]
# Full feature set
= { = "0.1.1", = ["full"] }
# Minimal WASM-compatible build
= { = "0.1.1", = false, = ["wasm"] }
# Distributed deployment
= { = "0.1.1", = ["distributed"] }
Available features:
full(default): Complete feature set with all optimizationssimd: SIMD-optimized operationsstorage: Persistent storage with redbasync-runtime: Tokio async supportcompression: ZSTD/LZ4 compressiondistributed: RAFT consensus supportfederation: Cross-cluster federationwasm: WebAssembly-compatible minimal buildmetrics: Prometheus monitoring
Quick Start
Create a Graph
use ;
Cypher Queries
use ;
// Execute Cypher query
let executor = new;
let results = executor.execute?;
for row in results
Vector-Enhanced Graph
use ;
// Enable vector embeddings on nodes
let config = GraphConfig ;
let graph = new?;
// Create node with embedding
let node = graph.create_node?;
// Semantic similarity search
let similar = graph.search_similar_nodes?;
Hyperedges
use ;
// Create a hyperedge connecting multiple nodes
let meeting = graph.create_hyperedge?;
API Overview
Core Types
// Node in the graph
// Edge connecting two nodes
// Hyperedge connecting multiple nodes
Graph Operations
Performance
Benchmarks (1M Nodes, 10M Edges)
Operation Latency (p50) Throughput
-----------------------------------------------------
Node lookup ~0.1ms 100K ops/s
Edge traversal ~0.5ms 50K ops/s
1-hop neighbors ~1ms 20K ops/s
Cypher simple query ~5ms 5K ops/s
Vector similarity ~2ms 10K ops/s
Related Crates
- ruvector-core - Core vector database engine
- ruvector-graph-node - Node.js bindings
- ruvector-graph-wasm - WebAssembly bindings
- ruvector-raft - RAFT consensus for distributed mode
- ruvector-cluster - Clustering and sharding
Documentation
- RuVector README - Complete project overview
- API Documentation - Full API reference
- GitHub Repository - Source code
License
MIT License - see LICENSE for details.