alt.hn

8/21/2026 at 4:15:26 PM

Three ways to smuggle SQLite into Nix

https://fzakaria.com/2026/08/19/three-ways-to-smuggle-sqlite-into-nix

by domenkozar

8/22/2026 at 12:53:05 AM

Just convert it to a binary data structure suitable for this purpose and use the old-fashioned bsearch. It's so simple that you wouldn't even need SQLite.

by Naru41

8/21/2026 at 6:50:27 PM

It seems that you could just compile the data into the WASM blob. Then use a more optimized query engine than sqlite. This should be very fast to compile (most of the WASM is just a byte buffer, the code is just a few binary searches and some result encoding). The downside is that you need to recompile to update the repo, but I don't think that should be particularly expensive.

by kevincox

8/22/2026 at 12:13:48 AM

That's an interesting idea as well. Daniel wrote https://github.com/danielfullmer/nkv which also was a pretty fun experiment on how to improve data access within Nix. I love these cursed ideas.

by setheron

8/22/2026 at 12:12:19 AM

(author) If you have questions, happy to try and answer some.

by setheron

8/21/2026 at 11:15:28 PM

If this much JSON could fit in a microcontroller’s memory (7.5MB in text), and it’s a performance issue, maybe it’s worth upgrading the JSON parser?

by lsb

8/21/2026 at 5:42:41 PM

The WASM extension me like. Would be great to get that into mainline.

by ghthor