Remember Darwin? It’s the core of Apple’s macOS, and the company has always – sometimes intermittently – released its source code as open source. Not much ever really happens with Darwin, and any attempts at building a usable operating system on top of Darwin have failed. There was OpenDarwin, which at one point could run a GNOME desktop, but in 2006 it shut itself down, stating:
Over the past few years, OpenDarwin has become a mere hosting facility for Mac OS X related projects. The original notions of developing the Mac OS X and Darwin sources has not panned out. Availability of sources, interaction with Apple representatives, difficulty building and tracking sources, and a lack of interest from the community have all contributed to this. Administering a system to host other people’s projects is not what the remaining OpenDarwin contributors had signed up for and have been doing this thankless task far longer than they expected. It is time for OpenDarwin to go dark.
↫ OpenDarwin announcement from 2006 (archived)
Any other attempts at making Darwin work as a standalone operating system were further frustrated by the fact that Apple stopped releasing bootable Darwin images, so Darwin never amounted to much more than Apple throwing some code over the fence every now and then for some cheap goodwill among the few people who still believe Apple cares about open source. However, the dream is still alive – the idea that you could use Darwin to build a general purpose operating system, perhaps one with some semblance of compatibility with macOS software, is an attractive one.
Enter PureDarwin. This project has been around for a while now, releasing an X11-capable build of Darwin somewhere in 2015, followed long, long after that by a CLI-only build in 2020. A few days ago, the project announced an ambitious change in direction, with a plan and roadmap for turning PureDarwin into a general purpose operating system.
The PureDarwin project, originally created to bring Apple’s open-source Darwin OS to more people, is heading in a fresh new direction with some clear short-term and long-term goals. These new plans are all about breathing new life into PureDarwin. In the short term, we’re focused on getting some solid basics in place with graphical interfaces using MATE Desktop and LightDM, so users can get a functional and accessible experience sooner rather than later. Looking further down the line, the long-term goals—shown in some early wireframes—are about creating a fully featured, polished desktop experience that’s easy to use and visually appealing. Plus, a new versioning system will make it clear how PureDarwin is progressing independently from Apple’s Darwin updates, making it easier for everyone to keep track. This refreshed direction sets PureDarwin up to grow from its roots into a user-centered operating system.
↫ PureDarwin announcement
These plans and roadmap sound quite well thought-out to me. I especially like that they first focus on getting a solid MATE desktop running before shifting to building a more custom desktop environment, as this makes it much easier – relatively speaking – to get people up and running with Darwin. Once Darwin with MATE is halfway usable, it can serve its job as a development platform for the more custom desktop environment they have planned. It won’t surprise you, by the way, that the sketches for the custom desktop environment are very Apple-y.
As part of the goals of creating a usable MATE desktop and then a more custom desktop environment, a whole bunch of low-level things need to be handled. All the kexts (drivers) required for Darwin to boot need to be built, and CoreFoundation needs to be updated, a process that was already under way. On top of that, the project wants to focus on getting Wayland to work, make Darwin buildable under BSD/Linux, and develop an installer.
Beyond those goals, the project has an even bigger, tentative ambition: API compatibility with macOS. They make it very clear they’re not at all focused on this right now, and consider it more of a pie-in-the-sky goal for the the distant future. It’s an interesting ambition we’ve seen tried various times before, and it surely won’t be even remotely easy to get it to a level where it could do much more than run some command-line utilities. Darling, a similar project to run macOS binaries on Linux in the style of Wine, has only recently been able to run some small, very basic GUI applications.
I like all of these goals, and especially getting it to a state where you can download a Darwin ISO running MATE should be entirely realistic to achieve in a short timeframe. A custom desktop environment is a lot more work of course, all depending on how much they intend to reuse from the Linux graphics and desktop stack. Anything beyond that, and it becomes much murkier, obviously. As always, it’s all going to come down to just how many active and enthusiastic contributors they can attract, and more importantly retain once the initial excitement of this announcement wears off.
When Apple first release Darwin as Open Source, I expected a lot more from it. Back then, the macOS desktop was much further ahead than it is now. Developers had been flocking to macOS ( even the founder of the GNOME desktop ) and GNUstep was already about as capable as it is now. It seems obvious to me that somebody would grab Darwin, port X to it, and get GNUstep up and running to create a macOS clone. By now, years later, I would have expected a pretty credible Open Source macOS alternative. Maybe it would be making a real run at being the Open Source desktop that normal people can move to.
But while there were small projects, including this one, Darwin was pretty much ignored. Even stranger, efforts like Etoile, Hello System, and RavynOS tended to go for a Linux or FreeBSD base instead of Darwin.
The same thing has happened on the API / SDK side as well. GNUstep could build an Apple Mail or a Text Edit even in the early days of macOS. But as macOS evolved, GNUstep did not and stayed closer to its NeXTstep roots. Today, the gap has grown fairly wide. And others with a vision for running macOS apps reinvented the wheel like Cocotron and Apportable. Even though Cocotron never got there, people taking another run at it seem to gravitate towards Cocotron instead of GNUstep. I have never dug deep enough to know why. And now, it almost seems too late to matter.
Apple moved away from ObjectiveC quite a while ago. These days, Swift ships with a complete Open Source implementation of Foundation but GNUstep and Apportable still roll their own. GNUstep does not even work with Swift.
And Apple has moved away from Intel. So it is no longer easy to be macOS compatible on Intel. It will not be long before Intel stops being a supported platform for macOS apps. Apple will stop supporting the hardware. App makers will stop supporting older versions of macOS ( and so will stop supporting the hardware as well ).
I wish these guys luck and look forward to trying it out. It is just sad to think of what could have been. And yes, I acknowledge that I did nothing to help. I said sad, not angry. No judgement.
PureDarwin is the Answer to Apple’s issue with MacOS adoption in the wild. It’s a doubleedge sword, a s I see their actions having a SUN effect. But they answer to stockholders. *Sigh*
I think the opportunity has now passed to leverage Darwin in any meaningful way. When it was intel based there was potential to combine efforts with the hackingtosh community to bring over kexts and drivers. I wrote a couple back in the day to learn how it worked.
Now… its all Arm optimised, so your looking at using only on Apple hardware at best. And even then, with limited documentation.
Sadly, I’m pessimistic here, because their goals are already to lofty. Making a custom desktop, for a Super niche system will be difficult to get the developer power needed.
Adurbe,
That’s pretty cool. I didn’t know you were a macos kernel hacker 🙂
I actually looked into building a hackintosh years ago.
Can users run their own kexts on current ARM macs? Or do they need to apply to some apple developer program? I understand the reasons for locking down kernels, but it’s pretty clear how that disincentivizes and holds back a lot of legitimate FOSS development.
Yeah, it seems likely that one of the reasons apple hasn’t open sourced more is that they don’t actually want 3rd parties to be successful in using it. Independent devs have to put in a lot of effort before they can build something useful. Even then I am skeptical that it will be better than the original. And if it’s not better than the original, then it’s going to be incredibly difficult to get market-share. That said though, I still want to give my respects to people who try 🙂
MacOS has underperformed badly compared to GNU/Linux distros in head-to-head benchmark tests on the same hardware for at least the last decade. Good luck to these devs, but if they build it, I doubt they will find much of an audience.