Embeddable vector database for Rust and Python. HNSW indexing, metadata filtering, hybrid search, and snapshots. The SQLite of vector search.
- Rust 96.8%
- Python 2.4%
- HTML 0.3%
- TypeScript 0.2%
- Shell 0.2%
- Other 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| benches | ||
| docs | ||
| examples | ||
| flatpak | ||
| Formula | ||
| integrations/python | ||
| npm | ||
| observability | ||
| proto | ||
| python | ||
| scoop | ||
| scripts | ||
| snap | ||
| src | ||
| templates | ||
| tests | ||
| vecstore-eval | ||
| vecstore-loaders | ||
| wasm-pkg | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
VecStore
The SQLite of vector search. Embed semantic search directly in your app—no server required.
Why VecStore?
| Feature | VecStore | Pinecone/Weaviate | FAISS |
|---|---|---|---|
| Runs in browser | Yes | No | No |
| No server needed | Yes | No | Yes |
| Hybrid search | Yes | Yes | No |
| Metadata filtering | Yes | Yes | No |
| Python + Rust + JS | Yes | Partial | Python only |
Quick Start
Rust
[dependencies]
vecstore = "0.0.1"
use vecstore::VecStore;
let mut store = VecStore::open("vectors.db")?;
// Insert vectors with metadata
store.upsert("doc1", vec![0.1, 0.2, 0.3], json!({"title": "Hello"}))?;
// Semantic search
let results = store.query(&vec![0.1, 0.2, 0.3], 10)?;
// Filtered search
let results = store.query_with_filter(&query_vec, 10, "category = 'tech'")?;
Python
pip install vecstore-rs
import vecstore
store = vecstore.VecStore("vectors.db")
store.upsert("doc1", [0.1, 0.2, 0.3], {"title": "Hello"})
results = store.query([0.1, 0.2, 0.3], k=10)
JavaScript (Browser)
npm install vecstore-wasm
import init, { WasmVecStore } from 'vecstore-wasm';
await init();
const store = new WasmVecStore(384);
store.upsert("doc1", new Float32Array([...]), { title: "Hello" });
const results = store.query(queryVector, 10);
Features
Core
- HNSW Index - Sub-millisecond search on 100K+ vectors
- 9 Distance Metrics - Cosine, Euclidean, Dot Product, Manhattan, Hamming, Jaccard, and more
- Metadata Filtering - SQL-like expressions:
category = 'tech' AND score > 0.5 - Hybrid Search - Combine vector similarity with BM25 keyword matching
- Snapshots - Point-in-time backups and restore
Browser-First
- WASM Support - Full vector search in the browser, no backend
- Offline-Capable - Works without network connection
- Privacy-First - Data never leaves the user's device
- Sub-ms Latency - 0.2ms search on 100K vectors
Production
- Batch Operations - Parallel ingestion for large datasets
- Soft Delete + TTL - Flexible data lifecycle management
- Write-Ahead Log - Crash recovery with
wal_enabled: true - gRPC + HTTP Server - Optional server mode for multi-client access
Use Cases
- Local RAG - Semantic search for LLM context retrieval
- Browser Search - Privacy-first document search (legal, medical, financial)
- Offline Apps - Mobile/desktop apps with embedded search
- Prototyping - Test semantic search ideas without infrastructure
- Edge Computing - IoT devices with local vector search
Performance
| Dataset | Search Latency | Memory |
|---|---|---|
| 10K vectors (384d) | 0.3ms | ~20MB |
| 100K vectors (384d) | 0.2ms | ~180MB |
| 1M vectors (128d) | 0.2ms | ~200MB |
Documentation
- WASM Guide - Browser integration with React, Vue, Next.js
- Python API - Full Python documentation
- Architecture - System design overview
- Security Policy - Vulnerability reporting
Roadmap
Shipping Now
- HNSW with 9 distance metrics
- Metadata filtering
- Hybrid search (vector + BM25)
- Python bindings
- WASM/browser support
- Snapshots
Coming Soon
- LangChain/LlamaIndex integration
- Product Quantization (8-32x memory reduction)
- GPU acceleration
Alpha Notice
VecStore is in active development (0.0.x). APIs and file formats may change. Not recommended for production workloads with data you can't regenerate.
Contributing
We welcome contributions! See CONTRIBUTING.md.
High-impact areas:
- LangChain/LlamaIndex Python wrappers
- Browser demo applications
- Performance benchmarks
License
Apache 2.0 - see LICENSE.