Darling: Future of Darling

Created on 18 Aug 2020  Â·  3Comments  Â·  Source: darlinghq/darling

My subject matter expert tells me Apple is going to eventually move to ARM64 only support for their OS (and apps). With Roseta 2 allowing them to run x64 on arm64 via emulation.

My question is what does this mean for darling moving forward?

  • Will darling continue?
  • Will darling only ever run x86_32/x84_64 apps?
  • Will darling eventually run arm64 apps?
  • Will it be in an arm emulator or use one?
  • Will there still be an LKM?

Related: #642 #352

Discussion

Most helpful comment

Darling will definitely continue — at least as a way to run x86_64 (or x86) binaries on x86_64 Linux systems. We also want to get arm64-on-arm64 binaries working (but not there yet).

Then, there's emulation. We're not going to implement a complete emulation solution from scratch, so the potential Darling Rosetta would be based on an existing emulator — usermode QEMU. We've been envisioning a bright distant future where Darling is able to run binaries for either ppc/ppc64/x86/x64/arm64 on either of those architectures, using Darling Rosetta if the host and the program architecture don't match. But we're probably far away from that. Just arm64 on x64 is fairly possible though, but we have to get native arm64 on arm64 working first.

All 3 comments

Darling will definitely continue — at least as a way to run x86_64 (or x86) binaries on x86_64 Linux systems. We also want to get arm64-on-arm64 binaries working (but not there yet).

Then, there's emulation. We're not going to implement a complete emulation solution from scratch, so the potential Darling Rosetta would be based on an existing emulator — usermode QEMU. We've been envisioning a bright distant future where Darling is able to run binaries for either ppc/ppc64/x86/x64/arm64 on either of those architectures, using Darling Rosetta if the host and the program architecture don't match. But we're probably far away from that. Just arm64 on x64 is fairly possible though, but we have to get native arm64 on arm64 working first.

Will darling eventually run arm64 apps?

@andyneff I was working on adding ARM64 support (feature/arm-support branch), but I am putting it on hold for the time being since the XNU kernel needs to updated. Because @facekapow is doing a huge update to all of the open-source Apple code we use (update-sources branch), I rather have him deal with updating the kernel.

I personally do want Darling to support arm64 apps. Having MacOS arm64 apps working on Linux ARM64 devices will greatly benefit Linux.

By other hand, support to run PowerPC binaries, specially the PEF binaries are also an important addition. The latter format are used by several programs and games on Mac OS 9 and earlier Mac OS X era, which are used by Carbon programs (using the CarbonLib and InterfaceLib on Mac OS 9, that many functions are implemented on CoreServices).

I discovered that someone tried to implement a similar project like this to run some Mac OS 9 programs called Classix, but the development was stalled.
https://github.com/zneak/classix

This project could be merged as darling-classix, since it could make some Mac OS 9 programs (mostly games) running on Darling, since all classic libraries are wrappers to Darling's frameworks. Still it could be required to implement OpenTransport, OpenGL and Game Sprockets to make more useful (as many games requires to run.)
A CarbonLib wrapper could be done in a similar way.
Old and really ancient Mac OS software for 68K are unsupported on Classix, and better served to the M.A.C.E. and Executor 2000 emulators.
Panel Controls and Extensions are also unsupported, or within a restricted functionality to make the target program work, as long are pure user-mode software.
With this setup, it avoids to run a full emulator with a full copy on Mac OS 9, where all programs runs without real memory protection and had limited multitasking (not forgetting the PPC/68K emulation overhead required to several syscalls!).
With Classix, every Mac OS 9 program runs on a separate process and memory space, make them more stable than the original operating system. This could break some functionalities (specially productivity programs that share memory with other software), but it can be minimized using pipes, or not bother at all, since any eventual Mac OS 9 support on Darling would be limited. Many games (the target 99% of real world uses) would simply run happily on their own protected memory space.

The program itself uses a native Mach-O program (classix) that loads the PEF executable, and then the wrappers libraries (or native libraries that depends from the core wrappers), to make it work. Like Darling, Classix never finishes the GUI workings adequately, but the author intended to use the native Cocoa's bindings as possible, making all old programs "modernized".
Classix contains a PowerPC binary emulated forked form Dophin emulator, but it could be replaced by another one, or by Qemu User Mode.

If Classix would be merged to Darling (and can be implemented on their own repository), to support PEF binaries, it may be a supplemental bonus to bring back old games running on modern systems. Diablo II or Quake III MAc versions running on Linux using Darling would be nice. Micorsoft Office 2001, X or 2004 in a similar way could be another test (even partially working.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LubosD picture LubosD  Â·  5Comments

PhilipDeegan picture PhilipDeegan  Â·  7Comments

seanballais picture seanballais  Â·  6Comments

jmexe picture jmexe  Â·  5Comments

LubosD picture LubosD  Â·  5Comments