How asg017/sqlite-vec works
Project type and purpose
• This is an open-source SQLite extension written in pure C (“sqlite-vec”) that adds vector-search capabilities (virtual table module vec0) anywhere SQLite runs.
• It provides language bindings (Go, Python, Rust, Node.js, Ruby, etc.), example apps, benchmarks, tests, and a documentation site.
File structure
• Top-level:
• Core C extension sources, Makefile, scripts/, sqlite-vec.h.tmpl, sqlite-dist.toml.
• bindings/: wrappers for Go, Python, Rust (each with its own build files).
• examples/: small sample apps in various languages demonstrating loading the extension.
• benchmarks/: scripts and suites to measure performance.
• tests/: correctness, fuzzing, unit tests across C, Python, Rust, WASM.
• site/: VitePress-based documentation and API reference.
• GitHub workflows under .github/workflows: CI for test, release, and site deploy.
README for additional insights
• Explains core features (floats, int8, binary vectors in vec0) and how to install from Python/Node/Go/Rust/Datasette/rqlite.
• Provides sample SQL usage (loading via .load ./vec0, creating virtual tables, KNN queries).
Essential details to capture
• The modular plug-in nature of SQLite virtual tables.
• Multi-language binding strategy all pointing at the same shared library.
• The CI pipeline gates that ensure tests and docs are published.
• The examples and benchmarks as consumers of both the bindings and the core.