pito-storekit

pito-storekit is the SQLite store underneath PITO MD
desktop apps, as a small Rust crate named storekit. It is local SQLite
storage, not Apple’s StoreKit: it has nothing to do with in-app purchases.
It opens a store with one set of tuned pragmas, runs ordered schema migrations, writes long background jobs in short slices so the app’s own writes never wait long, keeps a gzip backup a day for 14 days, and names an app’s data and config folders where each OS expects them. It has no app logic of its own.
Works on Linux and macOS (Windows through WSL).
At a glance
Section titled “At a glance”Measured once on 2026-10-14 with cargo run --release --example measure
(storekit 0.1.2, Rust 1.97.1, AMD Ryzen 9 9950X, Samsung 990 PRO NVMe on
btrfs, Linux). The GIF above is a separate run of the same example; the
numbers move a little from run to run, and
Measure it on your machine shows how to run it yourself.
| Longest wait for one app write while a 4M-row job runs | 241 ms with write_sliced, none refused; with one transaction two writes gave up after the 1 s busy wait |
| Reopen an already-migrated store | 0.13 ms (median of 100) |
| Create a new store and migrate it | 74 ms |
| Daily backup of a 265.5 MiB store | 18.2 MiB, 14.6× smaller, in 3.8 s |
| Code | 608 lines of Rust, tests and blank lines left out |
| Dependencies | 4 direct (rusqlite with SQLite built in, flate2, dirs, tracing), 29 crates in the whole build |
| Cold build | 70 s for cargo build --release --examples, SQLite’s C source included |
Where to go next
Section titled “Where to go next”- Install and first use: add the crate and open a first store.
- Guides, one task a page:
- Formats: the files, tables, names and variables the crate reads and writes.
- API reference: every public item, from
cargo doc. - Changelog.
The code is MIT licensed, by Catalin Ilinca. The PITO MD name, every app and game name and their logos are © Catalin Ilinca, all rights reserved, and are not covered by the MIT licence.