# VecLite
[](https://github.com/rithulkamesh/veclite/actions/workflows/ci.yml)
[](https://crates.io/crates/veclite-db)
[](https://pypi.org/project/veclite-db/)
[](https://pkg.go.dev/github.com/rithulkamesh/veclite/bindings/go)
[](https://opensource.org/licenses/MIT)
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.h` or `bindings/cpp/veclite.hpp`.
### Zig
Zig wrapper over the C ABI.
- Status: Experimental
- Install: Import `bindings/zig/veclite.zig`.
## Example
```rust
use veclite_db::VecLite;
let mut db = VecLite::open("memory.vec").unwrap();
db.insert("doc_1", vec![0.1, 0.2, 0.3], None).unwrap();
let results = db.search(vec![0.1, 0.2, 0.3]).top_k(5).execute().unwrap();
```
## SQL Example
VecLite supports a custom SQL dialect for vector operations.
```sql
CREATE TABLE memory;
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:
```bash
cargo add veclite-db
```
## Status
VecLite is under active development.
## Roadmap
- SQL execution engine completion
- Compaction and retention policies
- Node.js bindings
## License
MIT
## Star History
[](https://star-history.com/#rithulkamesh/veclite&Date)