Menu

1 / 4

Actually Queryable Executables

Hacker News·2 months ago
#dE252s79
#fzakaria#sqlite#executable#database#article
Reading 0:00
15s threshold

I was pleasantly surprised and happy to see that my article ‘ Your executable is a SQLite database ’ resonated with people. It is a format I have been thinking about for a while, and the idea seems to have struck a chord with others.

A quick recap: SELF , a format where the program is a SQLite database. We can use binfmt_misc to trigger a custom interpreter that maps the rows in the segments table and jumps to the entry point, and a whole class of binary tooling collapses into SQL.

What keeps surprising me is how having the file format be a SQLite database keeps collapsing everything into SQL. One idea that was immediately evident to myself and others through comments: If the executable is a database, and a database is something you can write to, can the running program use it to also store its state? 🤔

Yes! 🤯 We can collapse not only a complete distribution but all the state for every application into a single file, alleviating the need for /var/ or /tmp/ or /home/ or any other filesystem.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.