A header-only C vector database library(github.com/abdimoallim)
41 points by abdimoalim 5 hours ago | 10 comments
- eatonphil 3 hours agoAs data stores go go this is basically in memory only. The save and load process is manually triggered by the user and the save process isn't crash safe nor does it do any integrity checks.
I also don't think it has any indexes either? So search performance is a function of the number of entries.
- kazinator 4 hours agoIn the world of Kubernetes and languages where a one-liner brings in a graph of 1700 dependencies, and oceans of Yaml, it's suddently important for a C thing to be one file rather than two.[-]
- jasonpeacock 54 minutes agoC libraries have advertised "header-only" for a long time, it's because there is no package manager/dependency management so you're literally copying all your dependencies into your project.
This is also why everyone implements their own (buggy) linked-list implementations, etc.
And header-only is more efficient to include and build with than header+source.
[-]- uecker 12 minutes agoI never copied my dependencies into my C project, nor does it usually take more than a couple of seconds to add one.
- fonheponho 1 hour agoExactly; I can't understand this obsession with header-only C "libraries".
- quotemstr 1 hour agoWriting new C code in 2026 is already an artisanal statement, so why not got all the way in making it?
- altcunn 19 minutes agoHeader-only C libraries are such an underappreciated pattern for embedding into larger projects. For vector search specifically, having something you can just drop into an existing C/C++ codebase without pulling in a whole database dependency is really appealing. Curious about the indexing strategy — is it brute force or does it support approximate nearest neighbor?
- hendler 2 hours agoUseful for embedded devices? Crashes, disk updates not important for ephemeral process?
- ddtaylor 1 hour agoWould it work to replace the memory store with mmap?
- Mikhail_Edoshin 3 hours agoWhy to call it a header? Could be just a source file. Including sources is uncommon, but why not? Solid "amalgamation" builds are a thing too.
- newzino 57 minutes ago[dead]