Case study
Portal 2: static recompilation for Apple silicon
Portal 2 is statically recompiled from its Linux x86 modules into a native ARM64 application for macOS and iPhone. Preparation tools lay out ELF modules and apply relocations; a lifter emits C functions that are compiled with a runtime for libc, threading, SDL2, graphics and Steam interfaces. The author reports playable builds on Mac and iPhone.
- Targets
- Game
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Sources reviewed
- Evidence class
- C1 partial scope or analysis entry
- Stars
- 101
- Last commit
- 2026-11-09
- Language
- C
- License (GitHub)
- GPL-3.0
GitHub data as of 2026-11-10
Evidence

- Observed
- Download and demo observed; the case covers part of the target software.
- Scope
- Partial
- Checked
- 2026-11-09
Requirements & limits
- Prerequisites: An Apple silicon Mac with Python 3.9 or newer, Homebrew, Xcode command line tools, SDL2, FreeType and Fontconfig.
- Prerequisites: An owned Portal 2 copy with its game folder and Linux binaries from Steam depot 661.
- Prerequisites: iPhone builds require Xcode, iOS 17 or newer, Developer Mode and about 12 GB of device space.
- Limits: Built against Linux depot 661 manifest 8940703274703023246; another release needs new indirect-call roots.
- License: GPL-3.0 license.
Cite
BibTeX
@misc{portal-2-apple-silicon-recomp-case,
title = {{Portal 2: static recompilation for Apple silicon}},
howpublished = {\url{https://github.com/kanapitsas/portal2-recomp}},
url = {https://github.com/kanapitsas/portal2-recomp},
urldate = {2026-11-08},
note = {Awesome REA entry: \url{https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/}}
}Plain text
Portal 2: static recompilation for Apple silicon. https://github.com/kanapitsas/portal2-recomp (accessed 2026-11-08). Awesome REA entry: https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/
Useful? Star Awesome REA on GitHub2.4k
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · kanapitsas/portal2-recomp · Revision 2704291
More in Games
- Power Dozer: statically recompiling Blast Corps · Case study
- Prince of Persia 2: statically recompiling the DOS game for Windows · Case study
- Project 8 Plus: a native recompilation of Tony Hawk's Project 8 · Case study
- Project Arwing (2): Star Fox 2 recompiled from a matching disassembly · Case study
- Project Arwing: Star Fox recompiled from a matching disassembly · Case study
- Project Gotham Racing 2: an Xbox XBE static recompilation · Case study