{"slug": "prompt2elf-an-llm-wrote-a-449-byte-http-server-without-a-compiler", "title": "Prompt2ELF: An LLM wrote a 449-byte HTTP server without a compiler", "summary": "Prompt2ELF, a project by developer faustinoaq, lets a coding agent produce Linux x86-64 executables directly as machine-code bytes without a compiler, assembler, or linker. The project's 334-byte hexwriter.bin helper converts hexadecimal text into an executable, and the same workflow generated a 167-byte Hello World, a 322-byte Mandelbrot renderer, and a 449-byte HTTP server that binds to 0.0.0.0:9000. Prompt2ELF ships as an Agent Skills package installable in Claude Code, Devin, GitHub Copilot, and OpenCode, and is intended for learning how executables work and building unusually small self-contained programs rather than replacing compilers for normal development.", "body_md": "**Can a coding agent go straight from a prompt to an executable, without writing source code first?**\n\nMost coding agents stop at source code and leave the rest to a compiler. Prompt2ELF gives the agent the instructions and tiny bootstrap it needs to produce Linux x86-64 programs as final machine-code bytes. The agent lays out the ELF file, encodes the instructions, and calls the kernel directly. A 334-byte helper named `hexwriter.bin` turns the resulting hexadecimal text into an executable.\n\n```\n/prompt2elf forge \"hello, world\"\n```\n\nThat request produces a 167-byte Hello World executable. The same process produced a 322-byte Mandelbrot renderer and a 449-byte HTTP server, without a compiler or assembler.\n\nThe point is not to replace compilers for normal software development. Prompt2ELF is for learning how executables really work, building unusually small self-contained programs, and exploring a direct interface between human intent and machine code.\n\nRequirements: Linux on x86-64.\n\n```\ngit clone https://github.com/faustinoaq/prompt2elf.git\ncd prompt2elf\n./bin/hello.bin\n```\n\nOutput:\n\n```\nHello, world!\n```\n\nRender a Mandelbrot set:\n\n```\n./bin/mandelbrot.bin\n```\n\nRun the HTTP server:\n\n```\n./bin/server.bin &\nSERVER_PID=$!\ncurl http://127.0.0.1:9000/\nkill \"$SERVER_PID\"\n```\n\nThe server binds to `0.0.0.0:9000`, so it is reachable through every available network interface while running.\n\n| Program | Size | What it does | \n|---|---|---|\n| `hello.bin` | 167 bytes | Writes `Hello, world!` and exits | \n| `hexwriter.bin` | 334 bytes | Converts hexadecimal text into an executable file | \n| `mandelbrot.bin` | 322 bytes | Computes a 64 by 32 ASCII Mandelbrot set | \n| `server.bin` | 449 bytes | Serves `Hello, world!` over HTTP on port 9000 | \n\nEvery executable has a matching source under `hex/`. The source is plain hexadecimal, not assembly.\n\nThe repository root is a standard Agent Skills package. Clone or copy the complete repository into a skill directory recognized by your coding agent, keeping the directory name `prompt2elf`.\n\n| Agent | Project skill location | \n|---|---|\n| Claude Code | `.claude/skills/prompt2elf/` | \n| Devin | `.agents/skills/prompt2elf/` | \n| GitHub Copilot | `.github/skills/prompt2elf/` | \n| OpenCode | `.agents/skills/prompt2elf/` | \n\nThen invoke it directly:\n\n```\n/prompt2elf forge \"print the current process ID\"\n```\n\nOr describe the task naturally:\n\n```\nUse Prompt2ELF to create a loopback-only HTTP status server.\n```\n\n`forge` is an action inside the Prompt2ELF skill. It does not invoke Foundry or another installed command named `forge`.\n\n1. The coding agent reads `SKILL.md` for the target ABI, encoding workflow, and safety rules.\n2. It designs the ELF layout and writes the complete executable as hexadecimal text.\n3. `hexwriter.bin` decodes that text, writes the bytes, and marks the output executable.\n4. The rebuilt file is compared byte for byte and tested as a native Linux process.\n\nRebuild Hello World yourself:\n\n```\n./bin/hexwriter.bin /tmp/hello.bin < hex/hello.hex\n/tmp/hello.bin\n```\n\nThe writer can also reproduce itself:\n\n```\n./bin/hexwriter.bin /tmp/hexwriter-copy.bin < hex/hexwriter.hex\ncmp -s ./bin/hexwriter.bin /tmp/hexwriter-copy.bin\n```\n\nReproducing these binaries does not require a compiler, assembler, linker, libc, package manager, or language runtime. Prompt2ELF still depends on an x86-64 processor, the Linux syscall ABI, the kernel's ELF loader, and a filesystem. The machine has not disappeared. The conventional source-to-binary toolchain has.\n\n- The bundled profile supports only Linux x86-64.\n- Instruction offsets and ELF sizes must be exact, so small changes can require several recalculations.\n- The examples favor size and clarity over complete production error handling.\n- Generated native code should be inspected and run with minimal privileges.\n- For ordinary application development, use a compiler.\n\n- [`SKILL.md`](https://github.com/faustinoaq/prompt2elf/blob/main/SKILL.md) contains the coding-agent workflow and constraints.\n- [`hex/README.md`](https://github.com/faustinoaq/prompt2elf/blob/main/hex/README.md) explains every bundled executable at the byte level.\n- [`hex/`](https://github.com/faustinoaq/prompt2elf/blob/main/hex) contains the canonical hexadecimal sources.\n- [`bin/`](https://github.com/faustinoaq/prompt2elf/blob/main/bin) contains the matching runnable artifacts.\n\nThe longer-term direction is a small multicall executable, similar in spirit to BusyBox, generated directly from prompts and Linux syscalls.", "url": "https://wpnews.pro/news/prompt2elf-an-llm-wrote-a-449-byte-http-server-without-a-compiler", "canonical_source": "https://github.com/faustinoaq/prompt2elf", "published_at": "2026-09-25 17:08:32+00:00", "updated_at": "2026-09-25 17:33:10.371338+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Prompt2ELF", "faustinoaq", "hexwriter.bin", "Claude Code", "Devin", "GitHub Copilot", "OpenCode", "Linux"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/prompt2elf-an-llm-wrote-a-449-byte-http-server-without-a-compiler", "markdown": "https://wpnews.pro/news/prompt2elf-an-llm-wrote-a-449-byte-http-server-without-a-compiler.md", "text": "https://wpnews.pro/news/prompt2elf-an-llm-wrote-a-449-byte-http-server-without-a-compiler.txt", "jsonld": "https://wpnews.pro/news/prompt2elf-an-llm-wrote-a-449-byte-http-server-without-a-compiler.jsonld"}}