upvote
XNU has some interesting features.

It’s Mach based, so it has Mach ports, which are an IPC system that is fairly heavily used by macOS.

It has DriverKit, which is a C++ framework for drivers that’s got morecsuppirt than the usual Unix driver model.

Mach-O does more than ELF, and enables the two-layer namespacing that makes macOS able to manage dynamic linking dependencies better than ELF.

Nothing really earth-shattering but interesting enough. And far easier to build a macOS environment on than FreeBSD.

reply
> Mach-O does more than ELF, and enables the two-layer namespacing that makes macOS able to manage dynamic linking dependencies better than ELF.

I've always admired that mach-o supports fat binaries.

reply
I honestly think the kernel interface is by far the easiest part of building a MacOS compat layer. The userland is gigantic, super complex, and totally closed source. That's the hard part.

AFAIK all macos software only talks to the kernel via userland APIs - so there's no particular benefit to basing ravynOS on XNU anyway. (Just the opinion of a layman.)

reply
The Mach APIs are available to userland applications, if you used a different kernel you’d have to implement them somehow
reply
But do real apps actually use them directly? Or only through the userland libraries?

Just FYI, the https://www.darlinghq.org project is doing MacOS app compat on Linux - i.e. building the userland libraries.

reply
Yes, real apps use Mach messaging directly. i.e.: https://source.chromium.org/chromium/chromium/src/+/main:ipc...
reply
Chrome is an outlier to how most apps will do things.
reply
The illustration that Chrome uses Mach ports is a counterexample to an (implied) insinuation that nothing in running in macOS user space uses Mach ports. Outlier or not, the fact there is at least one (albeit also very useful and very popular) application that uses them ties back to the conversation about how they're a kernel feature worth having for Mac compatibility.
reply
Most kernels are kind of the same really. Some have slightly fancier inter-process communication. Leading to my all-time favorite YouTube video, an explainer on Android IPC cut like a spy thriller. I'm not even joking: https://www.youtube.com/watch?v=Fb4UoqXPEtI
reply
This is great stuff, thank you for sharing!
reply
I have got to say this is one of the single most interesting things I've seen in a while. And she ... she's a goddess - so quirky! :)
reply
I don't think it's all that exciting. The hybrid BSD/mach personalities is somewhat interesting, as are some of the available mach machineries.

It's been a stable foundation for several of the most successful operating systems in history though

reply