opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

sqlite-vec: a tiny pure-C vector search extension that runs anywhere SQLite does
GitHub RepoImpressions3

Project Description

View on GitHub

Vector Search for SQLite Without the Headache

You've probably been there: you've got a SQLite database full of embeddings, and you need to find similar items by vector distance. The options are grim—either you load everything into memory and brute-force it with Python, or you stand up a whole separate vector database service just to run a handful of queries. Neither feels right. That's where sqlite-vec comes in. It's a tiny, pure-C extension that adds vector search directly to SQLite, so you can run similarity queries right alongside your regular SQL.

What It Does

sqlite-vec is a SQLite extension that gives you vec0 virtual tables for storing and querying vectors. It's the successor to sqlite-vss, and it's designed to be a small, "fast enough" solution rather than a heavyweight vector database.

The core functionality is straightforward: you create a virtual table with vector columns, insert your embeddings (float, int8, or binary), and then run K-nearest-neighbor queries using SQL. The extension handles the vector storage and distance calculations internally, so you don't need to manage any separate indexes or external services.

The technical foundation is worth noting: it's written in pure C with zero dependencies. That's the whole pitch, really. No Python runtime required, no Node bindings to fight with, no native compilation headaches beyond what SQLite itself already needs. It runs anywhere SQLite runs, which is just about everywhere.

Why It's Cool

It runs literally anywhere SQLite does. Not "anywhere major" — anywhere. Linux, macOS, Windows, Raspberry Pis, and even in the browser via WASM. Since it's pure C with no dependencies, you don't need to worry about whether your deployment target has the right shared libraries or Python version. If you can get SQLite running, you can get this running.

It's refreshingly small. The project explicitly aims to be "extremely small" and "fast enough" rather than trying to compete with dedicated vector databases on raw performance. That's an honest design constraint, and it means the extension stays lightweight and easy to integrate. You're not pulling in a massive runtime just to do a few similarity searches.

It handles more than just floats. While most vector search tools only handle float32 embeddings, sqlite-vec supports float, int8, and binary vectors. That's useful if you're working with quantized embeddings to save space, or if you're dealing with binary hash-based similarity.

It keeps your data together. You can store non-vector data in metadata, auxiliary, or partition key columns right in the same virtual table. That means you don't have to maintain a separate mapping between your vector IDs and your actual records—everything lives in one place.

Mozilla is funding it. It's part of the Mozilla Builders program, with additional sponsorship from Fly.io, Turso, SQLite Cloud, and Shinkai. That's a good sign for long-term maintenance and community support.

How to Try It

Getting started is about as easy as it gets for a SQLite extension. The install commands are familiar if you've used any SQLite extension before:

# Python
pip install sqlite-vec

# Node.js
npm install sqlite-vec

# Ruby
gem install sqlite-vec

# Go
go get -u github.com/asg017/sqlite-vec/bindings/go

Once it's installed, you load it into your SQLite session just like any other extension. The README points to detailed language-specific guides on the project website, but the basic pattern is: load the extension, create a vec0 virtual table, insert your vectors, and query with a KNN-style SQL statement.

One thing to keep in mind: this is pre-v1 software, so the API might shift between releases. The README is upfront about that—expect breaking changes. If you're building something that depends on this, pin the version and test your queries when you upgrade.

If you want to dig deeper, the full documentation lives at alexgarcia.xyz/sqlite-vec, and the source code is on GitHub.

Final Thoughts

sqlite-vec isn't trying to replace Pinecone or Milvus. It's solving a different problem: giving you decent vector search without adding a new service to your stack. If you're building a local-first app, a small tool, or a prototype that needs semantic search but doesn't need to scale to millions of vectors, this is a genuinely nice fit. It's also a great option for embedding in mobile or edge devices where you can't afford the overhead of a separate database. The pre-v1 status means you should test carefully, but for the convenience of having vector search in your existing SQLite setup, it's worth a look.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: fd3048ef-229f-4607-9937-10c8a13c3f47Last updated: August 19, 2026 at 02:47 AM