SnkvDB – Single-header ACID KV store using SQLite's B-Tree engine
I built *snkvDB* — a single-header, ACID-compliant key-value store with zero setup. https://github.com/hash-anu/snkv ### Why I built this I wanted something as simple as a hashmap, but: * persistent * crash-safe * no external dependencies * easy to drop into any C/C++ project Most KV stores are either: * too heavy (servers, background processes), or * too low-level (you manage everything) snkvDB tries to sit in between. --- ### What it is * Single-header KV store (just include and use) * ACID compliant (thanks to SQLite) * No server, no config, no build system…
What it does
In the maker’s words, at launch
I built *snkvDB* — a single-header, ACID-compliant key-value store with zero setup. https://github.com/hash-anu/snkv ### Why I built this I wanted something as simple as a hashmap, but: * persistent * crash-safe * no external dependencies * easy to drop into any C/C++ project Most KV stores are either: * too heavy (servers, background processes), or * too low-level (you manage everything) snkvDB tries to sit in between. --- ### What it is * Single-header KV store (just include and use) * ACID compliant (thanks to SQLite) * No server, no config, no build system required * Works like a simple embedded database --- ### Under the hood snkvDB is built on SQLite’s storage engine (B-Tree backend), so you get: * durability * transactions * mature, battle-tested storage But the API is simplified to a minimal KV interface. --- ### When to use it * Embedding storage in CLI tools or small apps * Replacing ad-hoc file storage * Lightweight persistence without running a DB server --- ### Benchmarks I’ve compared it with RocksDB and LMDB here: https://github.com/hash-anu/snkv TL;DR: * Faster than RocksDB for small/medium workloads * Easier to use than LMDB * Balanced read/write performance --- ### Trade-offs * Not for write-heavy, high-throughput workloads (RocksDB is better there) * LMDB can be faster for pure reads * This prioritizes simplicity + safety over raw performance --- Would love feedback, especially on: * API design * performance * real-world use cases
Does the same job
all alternatives →- KAKryptonite – a new home for your SSH private key2017 · krypt.co · ▲338
- ASA strongly-typed document DB that runs on any transactional KV store2021 · github.com · ▲113
- SISimple in-memory key/value store written in Elixir using Shards2016 · github.com · ▲80

- GIGodb is a simple Go ORM for PostgreSQL, MySQL, SQLite and SQL Server2016 · github.com · ▲205

More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com
