Find a file
rUv ca68320e0c docs: Expand README introduction and features to cover all crate capabilities
- Updated tagline to mention distributed capabilities and Raft consensus
- Added 7 key differentiators including horizontal scaling and AI routing
- Reorganized features into 4 categories:
  - Core Capabilities (vector search, Cypher, GNN, hyperedges, filtering, collections)
  - Distributed Systems (Raft, auto-sharding, multi-master replication, snapshots, metrics)
  - AI & ML (compression, differentiable search, semantic router, Tiny Dancer)
  - Deployment (HTTP/gRPC server, WASM, Node.js, FFI, CLI)
- Added Raft Consensus and Multi-Master Replication to comparison table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 18:23:15 +00:00
.claude Add README documentation for ruvector-cli and ruvector-core crates 2025-11-20 20:26:39 +00:00
.githooks feat: Add automated package-lock.json sync tooling 2025-11-25 21:24:14 +00:00
.github chore: Update workspace version to 0.1.2 and simplify CI workflow 2025-11-26 17:43:34 +00:00
benchmarks feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00
bindings-darwin-arm64 init 2025-11-21 21:13:12 +00:00
bindings-darwin-x64 init 2025-11-21 21:13:12 +00:00
bindings-linux-arm64-gnu init 2025-11-21 21:13:12 +00:00
bindings-linux-x64-gnu init 2025-11-21 21:13:12 +00:00
crates docs: Add README files for all crates and update root README with crates table 2025-11-26 18:15:05 +00:00
docs docs: Add Cypher reference, include Tiny Dancer, fix WASM build 2025-11-26 12:54:04 +00:00
examples feat: Add ruvector-gnn crate with GNN, compression, WASM and Node.js bindings 2025-11-26 04:50:36 +00:00
npm fix: Correct WASM build path and security audit workflow 2025-11-26 15:29:51 +00:00
packages feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00
scripts fix: Resolve pre-existing test failures and fix sync script 2025-11-26 17:54:38 +00:00
src Add advanced optimizations and update README 2025-11-20 19:31:42 +00:00
tests feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00
.env.example feat: Phase 3 - WASM architecture with in-memory storage 2025-11-21 13:40:34 +00:00
.gitignore chore: Add napi-rs build artifacts to .gitignore 2025-11-26 14:30:03 +00:00
Cargo.lock chore: Update workspace version to 0.1.2 and simplify CI workflow 2025-11-26 17:43:34 +00:00
Cargo.toml chore: Update workspace version to 0.1.2 and simplify CI workflow 2025-11-26 17:43:34 +00:00
CHANGELOG.md feat: Complete ALL Ruvector phases - production-ready vector database 2025-11-19 14:37:21 +00:00
CLAUDE.md feat: Implement Ruvector Phase 1 foundation 2025-11-19 13:39:33 +00:00
LICENSE Initial commit 2025-11-19 01:10:23 -05:00
package.json feat: Add Neo4j-compatible hypergraph database package (ruvector-graph) 2025-11-25 23:11:54 +00:00
README.md docs: Expand README introduction and features to cover all crate capabilities 2025-11-26 18:23:15 +00:00
REPO_STRUCTURE.md Clean up repository structure and organize documentation 2025-11-20 19:50:03 +00:00
ruvector-core-0.1.3.tgz chore: bump version to 0.1.3 and publish to npm 2025-11-25 16:43:08 +00:00

RuVector

MIT License Crates.io npm Rust Build Docs

A distributed vector database that learns. Store embeddings, query with Cypher, scale horizontally with Raft consensus, and let the index improve itself through Graph Neural Networks.

npx ruvector

All-in-One Package: The core ruvector package includes everything — vector search, graph queries, GNN layers, distributed clustering, AI routing, and WASM support. No additional packages needed.

What Problem Does RuVector Solve?

Traditional vector databases just store and search. When you ask "find similar items," they return results but never get smarter. They don't scale horizontally. They can't route AI requests intelligently.

RuVector is different:

  1. Store vectors like any vector DB (embeddings from OpenAI, Cohere, etc.)
  2. Query with Cypher like Neo4j (MATCH (a)-[:SIMILAR]->(b) RETURN b)
  3. The index learns — GNN layers make search results improve over time
  4. Scale horizontally — Raft consensus, multi-master replication, auto-sharding
  5. Route AI requests — Semantic routing and FastGRNN neural inference for LLM optimization
  6. Compress automatically — 2-32x memory reduction with adaptive tiered compression
  7. Run anywhere — Node.js, browser (WASM), HTTP server, or native Rust

Think of it as: Pinecone + Neo4j + PyTorch + etcd in one Rust package.

Quick Start

Node.js / Browser

# Install
npm install ruvector

# Or try instantly
npx ruvector
const ruvector = require('ruvector');

// Vector search
const db = new ruvector.VectorDB(128);
db.insert('doc1', embedding1);
const results = db.search(queryEmbedding, 10);

// Graph queries (Cypher)
db.execute("CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'})");
db.execute("MATCH (p:Person)-[:KNOWS]->(friend) RETURN friend.name");

// GNN-enhanced search
const layer = new ruvector.GNNLayer(128, 256, 4);
const enhanced = layer.forward(query, neighbors, weights);

// Compression (2-32x memory savings)
const compressed = ruvector.compress(embedding, 0.3);

// Tiny Dancer: AI agent routing
const router = new ruvector.Router();
const decision = router.route(candidates, { optimize: 'cost' });

Rust

cargo add ruvector-graph ruvector-gnn
use ruvector_graph::{GraphDB, NodeBuilder};
use ruvector_gnn::{RuvectorLayer, differentiable_search};

let db = GraphDB::new();

let doc = NodeBuilder::new("doc1")
    .label("Document")
    .property("embedding", vec![0.1, 0.2, 0.3])
    .build();
db.create_node(doc)?;

// GNN layer
let layer = RuvectorLayer::new(128, 256, 4, 0.1);
let enhanced = layer.forward(&query, &neighbors, &weights);

Features

Core Capabilities

Feature What It Does Why It Matters
Vector Search HNSW index, <0.5ms latency, SIMD acceleration Fast enough for real-time apps
Cypher Queries MATCH, WHERE, CREATE, RETURN Familiar Neo4j syntax
GNN Layers Neural network on index topology Search improves with usage
Hyperedges Connect 3+ nodes at once Model complex relationships
Metadata Filtering Filter vectors by properties Combine semantic + structured search
Collections Namespace isolation, multi-tenancy Organize vectors by project/user

Distributed Systems

Feature What It Does Why It Matters
Raft Consensus Leader election, log replication Strong consistency for metadata
Auto-Sharding Consistent hashing, shard migration Scale to billions of vectors
Multi-Master Replication Write to any node, conflict resolution High availability, no SPOF
Snapshots Point-in-time backups, incremental Disaster recovery
Cluster Metrics Prometheus-compatible monitoring Observability at scale

AI & ML

Feature What It Does Why It Matters
Tensor Compression f32→f16→PQ8→PQ4→Binary 2-32x memory reduction
Differentiable Search Soft attention k-NN End-to-end trainable
Semantic Router Route queries to optimal endpoints Multi-model AI orchestration
Tiny Dancer FastGRNN neural inference Optimize LLM inference costs
Adaptive Routing Learn optimal routing strategies Minimize latency, maximize accuracy

Deployment

Feature What It Does Why It Matters
HTTP/gRPC Server REST API, streaming support Easy integration
WASM/Browser Full client-side support Run AI search offline
Node.js Bindings Native napi-rs bindings No serialization overhead
FFI Bindings C-compatible interface Use from Python, Go, etc.
CLI Tools Benchmarking, testing, management DevOps-friendly

Benchmarks

Real benchmark results on standard hardware:

Operation Dimensions Time Throughput
HNSW Search (k=10) 384 61µs 16,400 QPS
HNSW Search (k=100) 384 164µs 6,100 QPS
Cosine Distance 1536 143ns 7M ops/sec
Dot Product 384 33ns 30M ops/sec
Batch Distance (1000) 384 237µs 4.2M/sec

Comparison

Feature RuVector Pinecone Qdrant Milvus ChromaDB
Latency (p50) 61µs ~2ms ~1ms ~5ms ~50ms
Memory (1M vec) 200MB* 2GB 1.5GB 1GB 3GB
Graph Queries Cypher
Hyperedges
Self-Learning (GNN)
AI Agent Routing Tiny Dancer
Raft Consensus
Multi-Master Replication
Auto-Compression 2-32x
Browser/WASM
Differentiable
Open Source MIT

*With PQ8 compression. Benchmarks on Apple M2 / Intel i7.

How the GNN Works

Traditional vector search:

Query → HNSW Index → Top K Results

RuVector with GNN:

Query → HNSW Index → GNN Layer → Enhanced Results
                ↑                      │
                └──── learns from ─────┘

The GNN layer:

  1. Takes your query and its nearest neighbors
  2. Applies multi-head attention to weigh which neighbors matter
  3. Updates representations based on graph structure
  4. Returns better-ranked results

Over time, frequently-accessed paths get reinforced, making common queries faster and more accurate.

Compression Tiers

RuVector automatically compresses cold data:

Access Frequency Format Compression Example
Hot (>80%) f32 1x Active queries
Warm (40-80%) f16 2x Recent docs
Cool (10-40%) PQ8 8x Older content
Cold (1-10%) PQ4 16x Archives
Archive (<1%) Binary 32x Rarely used

Use Cases

RAG (Retrieval-Augmented Generation)

const context = ruvector.search(questionEmbedding, 5);
const prompt = `Context: ${context.join('\n')}\n\nQuestion: ${question}`;

Recommendation Systems

MATCH (user:User)-[:VIEWED]->(item:Product)
MATCH (item)-[:SIMILAR_TO]->(rec:Product)
RETURN rec ORDER BY rec.score DESC LIMIT 10

Knowledge Graphs

MATCH (concept:Concept)-[:RELATES_TO*1..3]->(related)
RETURN related

Installation

Platform Command
npm npm install ruvector
Browser/WASM npm install ruvector-wasm
Rust cargo add ruvector-core ruvector-graph ruvector-gnn

Documentation

Topic Link
Getting Started docs/guide/GETTING_STARTED.md
Cypher Reference docs/api/CYPHER_REFERENCE.md
GNN Architecture docs/gnn-layer-implementation.md
Node.js API crates/ruvector-gnn-node/README.md
WASM API crates/ruvector-gnn-wasm/README.md
Performance Tuning docs/optimization/PERFORMANCE_TUNING_GUIDE.md
API Reference docs/api/

Crates

All crates are published to crates.io under the ruvector-* namespace.

Core Crates

Crate Description crates.io
ruvector-core Vector database engine with HNSW indexing crates.io
ruvector-collections Collection and namespace management crates.io
ruvector-filter Vector filtering and metadata queries crates.io
ruvector-metrics Performance metrics and monitoring crates.io
ruvector-snapshot Snapshot and persistence management crates.io

Graph & GNN

Crate Description crates.io
ruvector-graph Hypergraph database with Neo4j-style Cypher crates.io
ruvector-graph-node Node.js bindings for graph operations crates.io
ruvector-graph-wasm WASM bindings for browser graph queries crates.io
ruvector-gnn Graph Neural Network layers and training crates.io
ruvector-gnn-node Node.js bindings for GNN inference crates.io
ruvector-gnn-wasm WASM bindings for browser GNN crates.io

Distributed Systems

Crate Description crates.io
ruvector-cluster Cluster management and coordination crates.io
ruvector-raft Raft consensus implementation crates.io
ruvector-replication Data replication and synchronization crates.io

AI Agent Routing (Tiny Dancer)

Crate Description crates.io
ruvector-tiny-dancer-core FastGRNN neural inference for AI routing crates.io
ruvector-tiny-dancer-node Node.js bindings for AI routing crates.io
ruvector-tiny-dancer-wasm WASM bindings for browser AI routing crates.io

Router (Semantic Routing)

Crate Description crates.io
ruvector-router-core Core semantic routing engine crates.io
ruvector-router-cli CLI for router testing and benchmarking crates.io
ruvector-router-ffi FFI bindings for other languages crates.io
ruvector-router-wasm WASM bindings for browser routing crates.io

Bindings & Tools

Crate Description crates.io
ruvector-node Main Node.js bindings (napi-rs) crates.io
ruvector-wasm Main WASM bindings for browsers crates.io
ruvector-cli Command-line interface crates.io
ruvector-server HTTP/gRPC server crates.io

npm Packages

Package Description npm
ruvector All-in-one Node.js package (vectors, graphs, GNN) npm
@ruvector/wasm WASM bindings for browsers npm
@ruvector/graph Graph database with Cypher queries npm
@ruvector/gnn Graph Neural Network layers npm
@ruvector/tiny-dancer AI agent routing (FastGRNN) npm
@ruvector/router Semantic routing engine npm
# Install all-in-one package
npm install ruvector

# Or install individual packages
npm install @ruvector/graph @ruvector/gnn

Project Structure

crates/
├── ruvector-core/           # Vector DB engine (HNSW, storage)
├── ruvector-graph/          # Graph DB + Cypher parser + Hyperedges
├── ruvector-gnn/            # GNN layers, compression, training
├── ruvector-tiny-dancer-core/  # AI agent routing (FastGRNN)
├── ruvector-*-wasm/         # WebAssembly bindings
└── ruvector-*-node/         # Node.js bindings (napi-rs)

Contributing

We welcome contributions! See CONTRIBUTING.md.

# Run tests
cargo test --workspace

# Run benchmarks
cargo bench --workspace

# Build WASM
cargo build -p ruvector-gnn-wasm --target wasm32-unknown-unknown

License

MIT License — free for commercial and personal use.


Built by rUvGitHubnpmDocs

Vector search that gets smarter over time.