Simon Willison's link blog reports Farid Zakaria's pattern for making a Linux executable that is simultaneously a SQLite database. The technique writes the four-byte application ID in the SQLite file header, 68 bytes into the file, as 'SELF' (Structured Executable & Linkable Format).1

The ELF executable's components are organized into SQLite tables, and a C interpreter called 'self-exec' extracts and executes them. A binfmt_misc registration line tells the kernel to route files whose byte 68 equals 'SELF' to that interpreter, making the database file directly runnable.1

Context

This is not just embedding a payload in a database: the database file itself is the starting point of process execution. Standard execve handling is replaced by a registered binary format, so the pattern is Linux-specific and depends on binfmt_misc being available and configured.1

Assessment

The constraint that moves is the assumption that a SQLite file is inert data: once tagged with 'SELF' and registered, the file can be invoked as a native executable, with database tables supplying the ELF image. The post documents this conceptual shift through a NixOS example and an explicit binfmt_misc command, but leaves the schema and interpreter behavior largely unspecified.1

Caveats

What would change my mind is a primary source: a working repository, the SQLite schema, measured overhead, and confirmation that the file remains a valid queryable database after execution. Without those, the pattern is an interesting proof of concept rather than a mechanically verified technique.1