# Box64 — x86_64 Emulator for ARM64 and RISC-V Linux > A userspace x86_64 emulator with a dynamic recompiler that lets ARM64, RISC-V, and LoongArch Linux devices run x86_64 binaries, including games and desktop applications. ## Install Save in your project root: # Box64 — x86_64 Emulator for ARM64 and RISC-V Linux ## Quick Use ```bash # Build from source on ARM64 git clone https://github.com/ptitSeb/box64.git cd box64 && mkdir build && cd build cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j$(nproc) && sudo make install sudo systemctl restart systemd-binfmt # Run an x86_64 binary box64 ./my_x86_64_app ``` ## Introduction Box64 is a Linux userspace emulator that allows x86_64 applications to run on ARM64, RISC-V 64-bit, and LoongArch hardware. It uses a dynamic recompiler (dynarec) to translate x86_64 instructions to the host architecture at runtime, achieving performance levels that make desktop applications and even some 3D games playable on single-board computers and ARM laptops. ## What Box64 Does - Translates x86_64 machine code to ARM64, RV64, or LoongArch instructions at runtime - Wraps native system libraries so x86_64 programs can call host libc, OpenGL, and Vulkan - Integrates with binfmt_misc so x86_64 binaries launch transparently - Supports Wine and Proton for running Windows applications on ARM hardware - Handles multi-threaded applications and signal forwarding correctly ## Architecture Overview Box64 intercepts x86_64 instructions and either interprets them or feeds them to a platform-specific dynarec that emits native code blocks. Frequently executed code paths are cached in a translation buffer for reuse. For system library calls, Box64 has a wrapping mechanism that bridges x86_64 calling conventions to native ones, avoiding the overhead of emulating standard library code. ## Self-Hosting & Configuration - Build from source with CMake; enable the dynarec for your platform (ARM_DYNAREC, RV64_DYNAREC, etc.) - Register the binfmt handler so x86_64 ELF binaries run automatically - Set `BOX64_LOG` environment variable to control logging verbosity - Use `BOX64_LD_LIBRARY_PATH` to point to x86_64 library directories - Pair with Box86 (the 32-bit sibling) for i386 application support ## Key Features - Dynamic recompiler delivers playable performance for demanding applications - Library wrapping avoids emulating well-known libraries, boosting speed - Transparent binfmt integration requires no manual invocation - Works with Wine and Proton to run Windows software on ARM devices - Supports Raspberry Pi 4/5, Apple M-series (via Asahi Linux), Snapdragon, and RISC-V boards ## Comparison with Similar Tools - **QEMU user-mode** — general-purpose emulation with higher overhead; Box64 is optimised for performance via dynarec - **FEX-Emu** — similar x86 on ARM emulator; Box64 focuses on library wrapping for speed - **Rosetta 2** — Apple's proprietary translation layer for macOS; Box64 is open-source and Linux-only - **Box86** — the 32-bit (i386) sibling project; use both together for full x86 support - **Wine + Hangover** — combines Wine with QEMU for Windows apps on ARM; Box64 + Wine is generally faster ## FAQ **Q: Can it run Steam games?** A: Yes, with Wine or Proton. Many games are playable on Raspberry Pi 5 and similar hardware. **Q: How does performance compare to native?** A: Typically 50-80% of native x86_64 speed depending on the workload and dynarec maturity. **Q: Does it support Vulkan?** A: Yes. Box64 wraps Vulkan calls to the host driver, enabling DXVK and vkd3d-proton. **Q: Which ARM devices are supported?** A: Any ARM64 Linux system: Raspberry Pi 4/5, Pine64, Rockchip, Snapdragon, and Apple Silicon via Asahi Linux. ## Sources - https://github.com/ptitSeb/box64 - https://box86.org --- Source: https://tokrepo.com/en/workflows/asset-19518d80 Author: AI Open Source