GBA Recomp is a static recompiler. It turns the ARM code inside a GBA ROM into LLVM IR and links it into a real executable for desktop, mobile and the Web. There is no emulator loop and no JIT, and a cycle-exact interpreter verifies the result.
Click the screen to start; sound begins after that click. Rkanoid is a free homebrew breakout game. Its ROM is recompiled ahead of time to about 5 MB of WebAssembly, and saves stay in your browser.
Every package can run the native code and the reference interpreter side by side and compare registers, cycles and the framebuffer after every frame.
The LeafGreen framebuffer hash matches the mGBA reference. Commercial ROMs are only used locally and are never distributed.
One command (gba-recomp bundle) runs the whole pipeline and produces a package with the game embedded.
The built-in interpreter plays the game, with optional scripted input, and records every ARM/Thumb run it executes, including routines copied to RAM.
Each run is lowered to LLVM IR with exact cycle accounting and compiled in parallel shards for the target triple: x86-64, AArch64, ARMv7 or wasm32.
The machine code is linked with gba-native-rt, which provides the bus, PPU, APU, DMA, timers, IRQs, HLE BIOS, saves and the SDL3 frontend.
--verify-interpreter runs the native build in lockstep with the interpreter. Code that cannot be translated safely falls back to one interpreted step.
The recompiled package is a complete player with video, audio, input, settings, saves and online play.
An ARM7TDMI interpreter with PPU modes 0–5, sprites, windows, blending and mosaic, PSG and direct sound, DMA, timers, and SRAM/Flash/EEPROM saves.
Routines that games copy to IWRAM/EWRAM are recompiled as well. Content guards check the bytes before native code runs.
Keyboard, USB and Bluetooth gamepads, generic joysticks, GPIO buttons on Raspberry Pi and Orange Pi, and an on-screen gamepad for touch screens.
Video, audio and control settings in an in-game menu, a native macOS menu bar and context menu, or the separate gba-settings app.
Room codes, with signaling hosted inside one player's own game, and text chat over data channels. Voice, shared screens and link cable are planned next.
bundle embeds the ROM and produces a macOS .app, a Linux or Windows folder, an iOS .ipa, an Android APK or a static website.
CI builds and tests every target on each push. Each status below states what has actually been run.
aarch64-apple-darwinVerifiedPlayed locally and checked against the interpreter in CI.
x86_64-apple-darwinVerified in CICross-built and checked against the interpreter under Rosetta 2.
x86_64-unknown-linux-gnuVerified in CIBundled demo checked against the interpreter, headless.
aarch64-unknown-linux-gnuVerified in CIOn ARM64 Linux, with GPIO buttons via gpiochip v2.
x86_64-pc-windows-msvcVerified in CIBundled demo checked against the interpreter on Windows Server 2025.
wasm32-unknown-emscriptenPlayableThe demo at the top of this page, deployed by CI.
aarch64-apple-iosBuilds in CIAn unsigned .ipa and a simulator build; not yet run on a device.
aarch64-linux-androidBuilds in CIA debug-signed APK checked with aapt and apksigner; not yet run on a device.
You need Rust 1.99, the pinned LLVM 23.1.3 build and SDL3. Prebuilt toolchains and demo packages are attached to every release.
--embed, compile produces a package with no game data, and players bring their own ROM.--profile-input scripts button presses so the profile reaches more code.--target selects any of the eight triples from a single build host.# build the toolchain export LLVM_SYS_231_PREFIX=/path/to/LLVM-23.1.3 cargo build --release -p gba-recomp -p gba-native-rt # recompile the free demo into one package target/release/gba-recomp bundle \ --rom games/rkanoid-v3.00.gba --out out/Rkanoid # play it (macOS: out/Rkanoid.app) out/Rkanoid/game # or check native code against the interpreter out/Rkanoid/game --headless --frames 1200 --verify-interpreter # the same game for the Web target/release/gba-recomp bundle --rom games/rkanoid-v3.00.gba \ --out out/web --target wasm32-unknown-emscripten