Running Android ARM64 VR APKs connected Apple Vision Pro, nary JIT required!
klepton-ld translates Android .so libraries into loadable Apple .dylib and .framework libraries, which past nexus into the Klepton runtime. Klepton presently focuses connected Java-thin applications only (no ART, nary JVM).
For graphics, GLES 3.2 is translated to a vendored ANGLE GLES 3.0 (with its Metal backend), and Vulkan is translated to MoltenVK.
┌─────────────────────────────────────────────────────────────────┐
│ GUEST (translated Mach-O, instruction bytes mostly unmodified) │
│ libil2cpp · libunity · libunityopus · libmain · burst · ... │
└─────────────────────────────────────────────────────────────────┘
↕ imports resolved to Klepton runtime successful `klepton-ld`
┌─────────────────────────────────────────────────────────────────┐
│ libklepton_bionic libc/libm/libdl/pthread/liblog → libSystem │
│ libklepton_ndk ALooper · ANativeWindow · ASensor · AAsset │
│ libklepton_jni synthetic JavaVM / JNIEnv │
│ libklepton_ovrp ovrp_* reimplementation │
│ ... │
└─────────────────────────────────────────────────────────────────┘
↕ Frontend level (`mains`) and OS-specifics
┌─────────────────────────────────────────────────────────────────┐
│ MoltenVK (Vulkan → Metal) ANGLE (GLES 3.0) │
│ Compositor Services · ARKit · GameController · AVAudioEngine │
└─────────────────────────────────────────────────────────────────┘
While some Android and macOS reserve x18, immoderate (a batch of) older Android applications still usage x18, and macOS zeros x18 connected discourse switches. All usage of x18 is patched by klepton-ld truthful that per-library TLS slots are utilized instead.
Klepton besides has the expertise to load and spot .so files astatine runtime pinch mmap, but this is only really useful connected macOS wherever JIT is really allowed. It's apt that immoderate applications will require JIT if they hap to utilize scripting runtimes that expect it (LuaJIT, V8, immoderate else).
See BUILDING.md for the afloat guide. The short version:
brew instal pkg-config sdl3 apktool # big dependencies apktool d -f -o beatsaber beatsaber.apk # you proviso the APK; spot BUILDING.md make cheque # afloat regression sweep
Quick tally scripts:
./build_run_viewer.sh # build and tally macOS Beat Saber frontend ./build_run_vpro.sh # build and tally Vision Pro Beat Saber frontend ./build_run_slink.sh --shell --view # macOS Steam VR Link frontend (WIP)
Beat Saber is moving connected macOS and visionOS pinch insignificant graphical issues, Steam VR Link and improving generalizability/build tooling is still WIP.