A general purpose Apple Silicon layer for x86-64 PCs

(github.com)

102 points | by iceboundrock 10 hours ago ago

41 comments

  • iceboundrock 10 hours ago ago

    A general purpose Apple Silicon layer for x86-64 PCs. It is a UEFI boot program with an arm64-to-x86-64 translator, a Metal driver for NVIDIA GPUs and a model of Apple silicon hardware. macOS and most apps start, but it is slow and needs much more testing, as of v0.1.0

    • stingraycharles 7 hours ago ago

      Is the intent to support running macOS on it, or rather for e.g. Linux that targets Apple Silicon?

      • perfsakuya 6 hours ago ago

        To support running the Apple Silicon version of macOS on x86-64 PCs.

        • userbinator 5 hours ago ago

          There was a lot of discussion around the time the M1 came out about how it would be the end of Hackintoshes, but it seems the Hackintoshers just won't give up (and now they have the help of AI.)

          • ShinyLeftPad an hour ago ago

            honestly i'm surprised.

            apple still has good hardware but software feels increasingly bloated and buggy.

            back in the day I hackintoshed, but now i feel like switching to asahi sometimes (or at least dual booting it) when my silicon is supported.

            • stingraycharles 6 minutes ago ago

              Yeah the reason I switched to macOS is that pretty much all my hardware was already Apple, and it just integrates so much better.

              I did Hackintosh for a year or so as well maybe a decade ago, but that was a scary experience any time you did an OS update.

            • exe34 30 minutes ago ago

              Yeah my 2012 Mac book air runs nixos. Solid hardware, refuses to die, but it got pretty slow under os x about 10 years ago and I gave up.

  • yjftsjthsd-h 9 hours ago ago

    So, basically an emulator layer that doesn't need a host OS? (I'm not really interested in running Darwin, but that's a cool concept)

    • userbinator 5 hours ago ago

      I guess one could call it a "bare-metal/type 1 emulator" much like VMs can run in a "bare-metal/type 1 hypervisor".

    • cromka 9 hours ago ago

      "An ahead-of-time and just-in-time compiler translates arm64e code to x86-64."

      No, not the same, actually. It's more of a Rosetta, but other way round, if I understand this right.

      • yjftsjthsd-h 8 hours ago ago

        Rosetta is an emulator (or, I suppose, a series of emulators), i.e. a piece of software that makes a computer pretend to be another kind of computer. This is also a bit of lower level software that makes a (x86_64) computer pretend to be a different kind of computer (aarch64), in this case, by AoT and JIT translation, though that's an implementation detail. What distinction are you trying to make?

        • stavros 6 hours ago ago

          This doesn't emulate a computer so that code in another architecture can run, it translates the other architecture'a code to native code. It's a small difference, but I guess it is a difference.

      • throwaway27448 6 hours ago ago

        Is this not how qemu works? Is rosetta not considered an emulation layer? For all its name suggests otherwise, I would certainly refer to wine as an emulator, and it also uses these techniques.

        • zbentley 6 hours ago ago

          Not to be That Guy, but WINE doesn't use those techniques, and thus isn't an emulator.

          It lightly translates binary formats (Windows executables) into Linux-compatible executable code, and then runs that code against libraries that implement Windows APIs in terms of Linux underneath. It's not an emulator in the same way that your libc isn't emulating lockf(3) in terms of fcntl(2) underneath. In web-dev parlance, we'd call WINE a polyfill.

          Rosetta and QEMU on the other hand are emulators--emulators, in this instance, being a term of art that implies interpreting bespoke meaning from machine code instructions written in another program. Some emulators translate instructions 1:1, some have optimized stencils, some (like Rosetta) have kernel support for emulating very quickly, and some (maybe like Rosetta; sources disagree) also have hardware support as well.

          • yjftsjthsd-h 2 hours ago ago

            WINE emulates an ABI, rather than a CPU or such, but I'd happily argue that that's an emulator. (In fairness, though it's not generally described that way, I would call web polyfills API emulation)

          • leidenfrost 6 hours ago ago

            Wine as a polyfill makes so much more sense

          • userbinator 5 hours ago ago

            I believe WINE doesn't actually translate any instructions; it's a Windows PE loader and a bunch of libraries that implement Windows APIs using Linux equivalents.

            • throwaway27448 5 hours ago ago

              How does it handle stuff like syscalls without altering the executed code?

              • pcwalton 4 hours ago ago

                Windows apps don't use syscalls directly; they call into kernel32.dll, which is convenient for Wine. (Microsoft enforces this by scrambling the syscall numbers on OS updates [1].)

                [1]: https://j00ru.vexillium.org/syscalls/nt/64/

                • throwaway27448 2 hours ago ago

                  Huh, now I know. I suppose macos is the same way these days even if you can technically bypass it.

                  • Conan_Kudo 2 hours ago ago

                    Yes. Linux is the only major operating system where there is even a convention to directly access system calls. For macOS, everything goes through libSystem.

              • aunderscored 4 hours ago ago

                It installs handlers. I don't have the exact name but there's support in the kernel to redirect syscalls to a Userland process

          • throwaway27448 6 hours ago ago

            > It lightly translates binary formats (Windows executables) into Linux-compatible executable code,

            Does this not involve transpilation? I guess I was grouping that in under dynamic recompilation and AOT techniques.

            Regardless, I don't think that there's a benefit from defining emulation from an implementation rather than an empirical perspective. If it runs a chunk of code as if it were in a different environment, I'm kind of ok to call it an emulator. To the sibling's point, a polyfill would also fit as an emulation layer here.

            • ecnahc515 4 hours ago ago

              Not necessarily. It could just rewrite the outer portion to be an ELF loader that then calls into a runtime that actually shims the syscalls for example. I don't think WINE does exactly this but it's not really transpiling either.

              • yjftsjthsd-h 2 hours ago ago

                You don't even need that, really; just have wine load the PE binary into memory and hand it a bunch of DLLs that use Linux syscalls under the hood. It's less transpiler and more of a funky dynamic linker+loader plus libraries.

  • jamesy0ung 8 hours ago ago

    I noticed Golden Gate still ships with an x86_64 kernel (not kernelcache), I wonder if this is any useful

    james@Jamess-MacBook-Pro ~ % sw_vers ProductName: macOS ProductVersion: 27.2.1 BuildVersion: 26B131 james@Jamess-MacBook-Pro ~ % file /System/Library/Kernels/kernel /System/Library/Kernels/kernel: Mach-O 64-bit executable x86_64 james@Jamess-MacBook-Pro ~ % strings /System/Library/Kernels/kernel | grep "Darwin" @(#)VERSION: Darwin Kernel Version 27.2.0: Wed Oct 14 23:40:09 PDT 2026; root:xnu-13432.41.4~25/RELEASE_X86_64 Darwin Kernel Version 27.2.0: Wed Oct 14 23:40:09 PDT 2026; root:xnu-13432.41.4~25/RELEASE_X86_64 Darwin

    • vintagedave 8 hours ago ago

      This is fascinating. If x64 isn’t supported in Golden Gate why is this present?

      • ykl 6 hours ago ago

        Rosetta 2 is still supported, and the way Rosetta 2 works requires that various system components that x64 apps might depend on also be available in x64. x64 code that is running as arm64 translated by Rosetta 2 can’t call into native arm64 code due to ABI differences, so Rosetta 2 must translate the x64 version of system libraries as well.

        My impression was that this did not require the kernel though, just system frameworks, so I don’t know why there’s a full x64 kernel in there!

      • stingraycharles 7 hours ago ago

        Not saying this is the reason, but we build and test and release our software on platforms nobody uses, as it catches rare compiler / memory / UB bugs we otherwise wouldn’t have (eg win32 and FreeBSD)

        • 1over137 7 hours ago ago

          Lots of people use FreeBSD :)

    • ndiddy 7 hours ago ago

      Reminds me of how some of the dev versions of Snow Leopard still boot on PowerPC.

  • schmeichel 9 hours ago ago

    Huge. I have been desperately looking for a project like this to be able to use https://github.com/seedds/nxnative to be able to play my copy of BOTW on IOS. Thank you for sharing this, I will be trying it this evening.

    • sneurlax 9 hours ago ago

      Is this really needed? I got it working on macOS pretty easily without this. It's all in private repos tho, not exactly easy to share by URL unless you're willing to sign up for a gitea.

  • rbanffy 9 hours ago ago

    Sounds like a great use for those new Epyc processors with 256 cores…

  • orionblastar 9 hours ago ago

    This repository needs a star and a follow. It stops Intel Macs from becoming obsolete, but it is slow and buggy.

    • code_duck 7 hours ago ago

      Apple still supports the latest ones up to Tahoe, and probably security updates for a few years. You can install Windows 10 (no idea about 11) but that is only updated through next year. After that, there's Linux, of course.

    • rbanffy 9 hours ago ago

      I don’t think there is anything that can make Intel Macs not obsolete. Embrace it - that’s their charm and you should use them as they were intended to be used, and experience them as they were designed, as artifacts of their time.

      • iceboundrock 9 hours ago ago

        I installed CachyOS on my MacBook 16,1, and it feels much faster than with macOS, but the D side is still hot though.

      • LeFantome 7 hours ago ago

        No thank you. They can sit in a museum 30 years from now. Today, they are still amazing and productive machines (once you get macOS off them).

      • bigyabai 5 hours ago ago

        Many (most?) Intel Macs still receive microcode updates, Mesa support and recent kernel changes.

        The only obsolete part is macOS, which is removable.