What is this?
selfdb (SELF, Structured Executable & Linkable Format) makes a program that is literally a SQLite database instead of an ELF binary, plus the loader machinery to actually execute that database on Linux/NixOS.
Is this a library, or a file format with its own toolchain?
It is a custom executable file format (rows in a SQLite DB replace ELF sections) with a converter, a kernel binfmt_misc interpreter to run it, and Nix packaging to deploy it.
How do I try converting and running a .self file?
Use the self CLI (or elf2self/self2elf directly) in converter/ to turn an ELF binary into a .self SQLite file, then rely on the self-exec binfmt_misc interpreter in loader/ (installed via the Nix packages/NixOS module) to execute it.
Do I need Nix or NixOS to run this?
Yes — the project is built around nixpkgs/NixOS: it ships Nix packages, a selfify hook, and a NixOS module (programs.self) to register the binfmt interpreter and run a real system slice as .self files.
Is every execution mode (memfd, native, selfld) fully working?
Implementation status is tracked separately in the design doc, implying some of the three loader modes are more complete than others.
Does this run anywhere besides Linux/NixOS?
No, it's tied to Linux's binfmt_misc mechanism and the Nix ecosystem for packaging and the NixOS module, so it only runs there.
What is self-httpd?
An example server in examples/server/ whose pages, program, and visitor log all live in one .self file: it opens argv[0] as a database and serves responses from its own routes table, so editing the live site is literally a SQL UPDATE.
Why invert ELF into a database instead of just using ELF?
It's inspired by sqlelf (arXiv:2405.03883), which put a SQL view over ELF; selfdb inverts that idea so the SQL rows ARE the format itself, executed via a binfmt_misc interpreter.
What does libself-audit.so do?
It's an LDAUDIT library that lets stock glibc load .self shared libraries by resolving their symbols through SQL queries instead of normal ELF dynamic linking.
Where is the format itself defined?
The DDL for the .self SQLite schema lives in schema/self.sql, generated from selfconv/schema.py.
Which topics is it in?
nix, http-server, web-server, arxiv, binary-analysis, low-level, systems-programming, academic-research, reverse-engineering, sqlite, database, research