February 14, 2026
Header wars: one file to rule them all
A header-only C vector database library
One-file AI data toy sparks cheers, jeers, and memes
TLDR: A super-minimal, single-file C library for searching AI-style vectors just dropped, and the comments erupted over “simple genius” versus “toy with no durability or indexes.” Fans love the no-dependency vibe, critics say it won’t scale, and tinkerers dream up hacks like memory-mapped files.
Meet vdb, a tiny, single-file “vector database” in C that stores AI-style number lists (aka embeddings) and finds the closest matches. You drop in one file (vdb.h), pick a distance flavor (cosine, euclidean, or dot product), and it can even go multithreaded with a compile flag. It saves and loads to disk, has optional Python bindings, and ships under the Apache 2.0 license. Simple on purpose, no big dependencies—just vibes.
Cue the header wars. Minimalists cheered, while cynics rolled their eyes. One commenter roasted modern bloat with “a graph of 1700 dependencies, and oceans of Yaml,” basically crowning vdb the anti-Kubernetes. Another asked, “Why call it a header?” and pushed the idea that it’s just a bundled source file—one file to rule them all.
Then the pragmatists crashed the party. A top critique: vdb is in-memory only with manual save/load, not crash-safe, and there’s no index—so searches slow down as you add more data. Translation: great for small stuff, not your AI megastore. Others argued that’s fine if you’re on embedded gadgets or short-lived jobs where durability doesn’t matter.
The most nerdy twist? Someone asked if you could swap memory for “mmap” (using disk like memory). So the thread split into three camps: toy vs. tool vs. tinkerer. And that’s the fun—vdb is either refreshingly simple or simply not enough, depending on your faith in tiny things.
Key Points
- •vdb is a header-only C library (vdb.h) for storing and searching vector embeddings.
- •Supports cosine, Euclidean (L2), and negative dot product distance metrics.
- •Optional thread safety via VDB_MULTITHREADED using pthreads and read-write locks.
- •Provides persistence with a binary file format (magic 0x56444230), but metadata is not saved.
- •Includes a simple API for database management, vector operations, k-NN search, and Python bindings.