Ruvector Graph
Distributed Neo4j-compatible hypergraph database with SIMD optimization and Cypher query support.
ruvector-graph is a high-performance graph database engine that combines the power of hypergraphs with vector embeddings, enabling semantic graph queries and AI-powered graph analytics. Part of the Ruvector ecosystem.
Why Ruvector Graph?
- Neo4j Compatible: Cypher query language support for familiar graph queries
- Hypergraph Support: Model complex relationships with edges connecting multiple nodes
- Vector-Enhanced: Combine graph structure with semantic vector search
- SIMD Optimized: Hardware-accelerated operations via SimSIMD
- Distributed Ready: Built-in support for RAFT consensus and federation
- WASM Compatible: Run in browsers with WebAssembly support
Features
Core Capabilities
- Hypergraph Model: Edges can connect any number of nodes
- Property Graph: Rich properties on nodes and edges
- Cypher Parser: Full Cypher query language support
- Vector Embeddings: Semantic similarity on graph elements
- HNSW Indexing: Fast approximate nearest neighbor search
- Label Indexes: Roaring bitmap indexes for efficient label lookups
Advanced Features
- Distributed Mode: RAFT consensus for distributed deployments
- Federation: Cross-cluster graph queries
- Compression: ZSTD and LZ4 support for storage optimization
- Metrics: Prometheus integration for monitoring
- Temporal Graphs: Time-varying graph support (planned)
- Full-Text Search: Text search on properties (planned)
Installation
Add ruvector-graph to your Cargo.toml:
[]
= "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
- Main README - Complete project overview
- API Documentation - Full API reference
- GitHub Repository - Source code
License
MIT License - see LICENSE for details.