WaxProlix
7 months ago
Maybe a replacement for sqlite in some contexts if it's even lighter? What does tinykv do better than the current standard for file backed lightweight DB?
hasanyildiz
7 months ago
Great question! tinykv isn't trying to replace SQLite – they serve different needs. SQLite strengths: relational queries, ACID transactions, SQL. Complex data relationships and multi-user concurrent access. tinykv strengths: zero setup (no schema, no SQL), human-readable files (JSON – you can git diff them!), simple key-value API, built-in TTL support, Serde integration (any Rust type → storage).
Use cases where tinykv fits better: CLI tool config storage, game save files, application preferences, prototyping/MVP development, when you want to inspect/edit the data file manually.
I built it because I kept reaching for simple persistence, but SQLite felt like overkill for storing a HashMap<String, Value>.