{"slug": "portal-2-statically-recompiled-portal-2-for-apple-silicon-using-ai-coding-agents", "title": "Portal 2: Statically recompiled Portal 2 for Apple silicon using AI coding agents", "summary": "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.", "body_md": "## Evidence at a glance\n\nLoading source evidence…\n\n## What was done\n\nThis 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.\n\nThe project [portal2-recomp](https://raw.githubusercontent.com/kanapitsas/portal2-recomp/HEAD/README.md) 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.\n\n## Reproduce it\n\n```\nClone 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.\n```\n\n## Community\n\nAsk a question, share what worked, or follow the next milestone.\n\n[Your library](https://reversedwithai.com/library)", "url": "https://wpnews.pro/news/portal-2-statically-recompiled-portal-2-for-apple-silicon-using-ai-coding-agents", "canonical_source": "https://reversedwithai.com/p/portal-2-c353c1c2", "published_at": "2026-10-31 01:01:03+00:00", "updated_at": "2026-10-31 01:48:03.170913+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-tools", "developer-tools"], "entities": ["Raphaël Kanapitsas", "Portal 2", "portal2-recomp", "Anthropic", "Claude Code", "OpenAI", "Codex", "Apple silicon"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/portal-2-statically-recompiled-portal-2-for-apple-silicon-using-ai-coding-agents", "markdown": "https://wpnews.pro/news/portal-2-statically-recompiled-portal-2-for-apple-silicon-using-ai-coding-agents.md", "text": "https://wpnews.pro/news/portal-2-statically-recompiled-portal-2-for-apple-silicon-using-ai-coding-agents.txt", "jsonld": "https://wpnews.pro/news/portal-2-statically-recompiled-portal-2-for-apple-silicon-using-ai-coding-agents.jsonld"}}