ares-vector
A pure-Rust embedded vector database with HNSW (Hierarchical Navigable Small World) indexing for high-performance approximate nearest neighbor search.
Features
- Pure Rust: No native dependencies, compiles anywhere Rust does
- HNSW Indexing: Fast approximate nearest neighbor search
- Thread-Safe: Designed for concurrent read/write access
- Persistence: Optional disk-based storage with memory-mapped files
- Multiple Distance Metrics: Cosine, Euclidean (L2), Dot Product, Manhattan (L1)
Quick Start
use ;
async
Architecture
┌─────────────────────────────────────────────────────────────┐
│ VectorDb │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Collection ││
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ ││
│ │ │ HNSW Index │ │ ID Mapping │ │ Metadata Store │ ││
│ │ │ (search) │ │ (str → u64) │ │ (optional) │ ││
│ │ └─────────────┘ └─────────────┘ └─────────────────┘ ││
│ └─────────────────────────────────────────────────────────┘│
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Persistence Layer (optional) ││
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ ││
│ │ │ Bincode │ │ Snapshots │ │ WAL (future) │ ││
│ │ └─────────────┘ └─────────────┘ └─────────────────┘ ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘