VecLite
VecLite is an embedded vector database. It runs in-process and stores data in a single file.
It provides exact and approximate nearest neighbor search, metadata filtering, and a vector-native SQL dialect. It is designed for applications that require vector search without operating a separate database server.
Features
- Embedded architecture (no server required)
- Single-file storage
- SIMD-accelerated vector metrics (Cosine, L2, Dot Product, Manhattan)
- HNSW indexing
- SQL query layer
- Hybrid search (vector similarity combined with metadata filters)
- Cross-language support via C ABI
Language Bindings
VecLite is written in Rust. It provides native bindings for multiple languages.
Rust
The core database.
- Status: Stable
- Install:
cargo add veclite-db
Python
Native Python module using PyO3. Releases the Global Interpreter Lock (GIL) during search operations.
- Status: Stable
- Install:
pip install veclite-db
Go
CGO wrapper over the C ABI.
- Status: Stable
- Install:
go get github.com/rithulkamesh/veclite/bindings/go@v1.0.9
C / C++
Standard C header and C++ RAII wrapper.
- Status: Stable
- Install: Copy
bindings/c/veclite.horbindings/cpp/veclite.hpp.
Zig
Zig wrapper over the C ABI.
- Status: Experimental
- Install: Import
bindings/zig/veclite.zig.
Example
use VecLite;
let mut db = open.unwrap;
db.insert.unwrap;
let results = db.search.top_k.execute.unwrap;
SQL Example
VecLite supports a custom SQL dialect for vector operations.
;
INSERT INTO memory VALUES ('doc_1', '[0.1, 0.2, 0.3]', '{"tag":"note"}');
SELECT * FROM memory WHERE metadata.tag = 'note' ORDER BY vector <-> '[0.1, 0.2, 0.3]' LIMIT 5;
Installation
Use the package manager for your target language. For the CLI and HTTP server:
Status
VecLite is under active development.
Roadmap
- SQL execution engine completion
- Compaction and retention policies
- Node.js bindings
License
MIT