cd /news/artificial-intelligence/portal-2-statically-recompiled-porta… · home › topics › artificial-intelligence › article
[ARTICLE · art-161294] src=reversedwithai.com ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Portal 2: Statically recompiled Portal 2 for Apple silicon using AI coding agents

Raphaël Kanapitsas statically recompiled the Linux x86 binaries of Portal 2 into a native ARM64 application for Apple silicon, publishing the work as portal2-recomp, with Anthropic's Claude Code and OpenAI's Codex writing the majority of the code in October 2026. The project translates x86 machine code into C and compiles it against a custom runtime supplying libc, threads, SDL2 and graphics interfaces, and Kanapitsas reports the game is fully playable on macOS and on an iPhone 15 Pro Max at a steady 60 fps via a Metal renderer. The build is limited to a specific release of the Linux binaries, and the iOS version lacks co-op, achievements and Steam features; GitHub Actions run runtime checks and Python tests but not full game builds because game files are absent.

by read1 min views5 publishedOct 31, 2026
Portal 2: Statically recompiled Portal 2 for Apple silicon using AI coding agents
Image: Reversedwithai (auto-discovered)

Evidence at a glance #

source evidence…

What was done #

This project performs static recompilation of the Linux version of Portal 2 into a native ARM64 application for macOS and iPhone, utilizing a custom runtime for system calls and graphics without emulation.

The project portal2-recomp transforms the Linux x86 binaries of Portal 2 into a native ARM64 application for Apple silicon devices. The process involves translating x86 machine code into C and compiling it, supported by a runtime that provides necessary interfaces for libc, threads, SDL2, and graphics. The author reports the game is fully playable on macOS and iPhone 15 Pro Max, with the latter achieving a steady 60 fps. The implementation includes a Metal renderer, which provides performance improvements over the OpenGL fallback. Development was conducted by Raphaël Kanapitsas in October 2026, with AI coding agents, specifically Anthropic's Claude Code and OpenAI's Codex, writing the majority of the code. The project is limited to a specific release of the Linux binaries, and the iOS version lacks co-op, achievements, and Steam features. GitHub Actions are used for runtime checks and Python tests, though full game builds are not performed in CI due to the absence of game files.

Reproduce it #

Clone the repository and run ./setup.sh with paths to the game folder and the Linux depot 661. For iOS, use ./setup.sh --ios with Xcode and a valid Apple ID.

Community #

Ask a question, share what worked, or follow the next milestone.

Your library

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @raphaël kanapitsas 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/portal-2-statically-…] indexed:0 read:1min 2026-10-31 · —