←back to thread

22 points hasanyildiz | 2 comments | | HN request time: 0.497s | source

I built tinykv because I kept reaching for simple persistent storage in Rust projects but found existing solutions either too complex (sled) or unmaintained (pickledb).

tinykv focuses on simplicity: JSON-based, serde-powered, with optional TTL. Perfect for CLI tools, game saves, config storage.

Would appreciate any feedback from the HN community!

1. WaxProlix ◴[] No.44469128[source]
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?
replies(1): >>44474713 #
2. hasanyildiz ◴[] No.44474713[source]
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>.