A SwiftUI iOS application designed to host a Box64 execution environment with JIT capabilities.
- JIT Environment Initialization: Uses ptrace to signal debugging mode for iOS JIT activation via SideStore
- Box64 Integration: Cross-compiled Box64 for iOS A18 Pro with 16KB page optimization
- 16KB Page Size Support: Optimized for iPhone 16 Pro (A18 Pro) memory architecture
- Memory Management: Executable memory allocation for dynamic code generation
- Automated Compilation: Shell script and GitHub Actions for Box64 cross-compilation
- iOS 16.0+
- SideStore for JIT entitlements
- ARM64 device (iPhone/iPad)
- macOS with Xcode (for compilation)
# Clone and compile Box64 for iPhone 16 Pro
./compile_engine.shThe script generates Box64.framework ready for iOS integration.
Install the app with proper JIT entitlements.
The compile_engine.sh script handles:
- Repository Management: Clones latest Box64 from GitHub
- Cross-Compilation: Targets iOS A18 Pro with specific flags
- Framework Creation: Generates iOS-ready framework
- Verification: Validates architecture and page size support
- Target: iPhone 16 Pro (A18 Pro)
- Architecture: ARM64 with 16KB pages
- CMake Flags:
-DARM_DYNAREC=ON -DAPPLE=1 -DPAGE16K=ON - Compiler: Apple Clang with A18 Pro optimizations
Box64.framework/- iOS frameworklibbox64.dylib- Dynamic librarybox64.h- C header for integration
The app includes the following entitlements in WinlatoriOS.entitlements:
com.apple.security.get-task-allow: Allows task inspectioncom.apple.security.cs.allow-jit: Enables JIT compilationcom.apple.developer.kernel.increased-memory-limit: Increased memory limit for emulation
- Objective-C++ bridge for JIT initialization
- ptrace integration for iOS JIT activation
- 16KB page size validation
- Box64 environment integration
- Real-time status display
- JIT and Box64 initialization controls
- System information display
- Environment reset functionality
- Cross-compiled for iOS A18 Pro
- 16KB page size optimization
- ARM64 dynamic recompilation
- Memory management utilities
- Compile Box64: Run
./compile_engine.shto generate the framework - Install App: Install via SideStore with proper entitlements
- Initialize JIT: Launch app and tap "Initialize JIT Environment"
- Load Box64: Framework is automatically loaded and ready
- Run Executables: Use Box64 to run x86-64 Linux executables
- JIT environment setup with ptrace
- Box64 cross-compilation for iOS
- 16KB page size optimization
- SwiftUI interface for control
- Automated build pipeline
- Complete x86-64 executable loading
- Dynamic linking support
- Linux syscall compatibility layer
- Performance optimization
- Advanced UI features
GitHub Actions automatically compiles Box64 when:
- Script changes are pushed
- Pull requests are created
- Manual workflow dispatch
Artifacts are uploaded as:
Box64-iOS-Framework- Ready-to-use frameworkBox64-iOS-Zip- Compressed framework
- COMPILE.md - Detailed compilation guide
- GitHub Actions - Automated build pipeline
MIT License - see LICENSE file for details