selfdb: Executable Binaries as SQLite Databases Instead of ELF Files

Repositoryfzakaria/selfdbTool

selfdb introduces SELF (Structured Executable & Linkable Format), a project that replaces the standard Linux ELF binary format with a SQLite database, providing the runtime machinery to execute these database files directly.

Key points

  1. Replaces ELF binaries with SQLite databases (SELF), making database rows the actual binary format.
  2. Enables traditional binary operations like ldd or strip via SQL statements (e.g. 'DELETE FROM sections').
  3. Provides self-exec, a binfmt_misc interpreter offering three execution modes: memfd, native, and selfld (a SQL-based dynamic linker).
  4. Includes libself-audit.so, an LD_AUDIT library allowing standard glibc to load .self shared libraries resolved via SQL queries.
  5. Contains converter tools (elf2self, self2elf via Python and LIEF) alongside Nix/NixOS modules, hooks, and VM tooling.
  6. Features self-httpd, a demo web server where program code, HTML routes, and visitor logs live inside a single executable SQLite file.

Why it matters

Traditional executable formats like ELF require dedicated binary analysis tools. Representing program headers, sections, and symbols inside relational tables turns binary inspection, dynamic linking, and binary modification into standard SQL operations.

Analysis

Building upon the author's previous work on sqlelf, selfdb inverts the model: rather than wrapping ELF in SQL views, the database is the executable. It leverages Python, LIEF, binfmt_misc, and the Nix ecosystem for testing and execution. Geared toward systems programmers, compiler researchers, and binary analysis enthusiasts, selfdb is currently an experimental proof-of-concept; it features working showcases, a test harness tracking milestones (M0–M3b), and a self-contained NixOS VM environment.

Found in

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Repository:tursodatabase/turso

    Turso: Rust-Powered SQLite-Compatible In-Process SQL Database

    Turso is an open-source in-process SQL database written in Rust that provides SQLite compatibility and an experimental Postgres frontend. Dubbed the 'LLVM of databases', it compiles SQL into bytecode executed by an internal virtual machine.

    24.2kstarsRust

    Web development· Tool

  • Repository:mxhm11cr/LinuxRunner

    LinuxRunner Brings ARM64 Linux Apps to iOS and iPadOS Without Jailbreak

    LinuxRunner runs ARM64 Linux userspace and desktop applications on iPhones and iPads. Using a custom interpreter and syscall compatibility layer, it executes Linux distributions natively without virtual machines or jailbreaking.

    282starsC

    Open source· Tool

  • Repository:woelper/offgrid

    offgrid: Self-Contained All-in-One Local LLM Runtime in Rust

    offgrid is a portable single-binary Rust tool for downloading, running, and serving large language models completely offline. By compiling llama.cpp straight into the executable, it eliminates Python dependencies and external model servers. It provides developers with a telemetry-free, offline-ready AI environment for chat, coding agents, and API usage.

    4starsRust

    AI & LLMs· Tool

  • Repository:tractordev/webframe

    webframe: Running Web Pages as CLI Programs via Native Webviews

    webframe executes web pages headlessly using native operating system webviews and pipes their I/O directly to the terminal. Console logs route to stdout, exceptions to stderr, and stdin supports interactive JavaScript evaluation. This provides developers with a lightweight runtime for WASM, WebGPU, and DOM libraries in CI or background scripts without heavy browser automation stacks.

    174starsGo

    Web development· Tool

  • Repository:swoole/typephp

    TypePHP: AOT Compiler Translates PHP to Native Binaries

    TypePHP is an Ahead-Of-Time (AOT) compiler developed under Swoole that translates PHP source code into C++17 and then into native machine code. It produces standalone executables, PHP extensions, shared libraries, or WASI components without interpreting Zend opcodes at runtime.

    1.2kstarsPHP

    Web development· Tool

  • Repository:coollabsio/coolify

    Coolify: Open-source PaaS alternative for self-hosted cloud deployments

    Coolify is an open-source, self-hostable Platform-as-a-Service (PaaS) under the Apache 2.0 licence, designed as an alternative to Vercel, Heroku, and Netlify. It allows users to deploy web apps, static sites, databases, and over 280 one-click services onto their own servers via SSH.

    61.4kstarsPHP

    Web development· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.