



Pure-Rust implementation of HNSW algorithm for approximate nearest neighbor search. Decouples graph from vector storage for flexible deployment. Supports dense floating point and quantized int8 vectors. This is an OSS library.
Loading more......
hnswlib-rs is a pure-Rust implementation of the HNSW (Hierarchical Navigable Small World) algorithm inspired by the original C++ hnswlib. Designed with a decoupled architecture separating graph structure from vector storage.
The library intentionally decouples components:
Hnsw<K, M>: Owns the graph + mapping from external key K to internal NodeIdVectorStore: Keyed by NodeId, supplies vectors on demandAvailable on crates.io:
[dependencies]
hnswlib-rs = "*"
GitHub: jean-pierreBoth/hnswlib-rs Crates.io: https://crates.io/crates/hnswlib-rs
Implements the algorithm from: "Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs" by Yu. A. Malkov and D. A. Yashunin
Free and open-source under MIT or Apache 2.0 license. No licensing costs.