CLI tool
darlinghq/darling avatar
darlinghq/darling

Darling: a macOS emulation layer for Linux, and who should actually run it

Darwin/macOS emulation layer for Linux

13,402 stars529 forksObjective-CGPL-3.0

At a glance

What is it?
Darling loads Mach-O binaries on Linux through a userspace kernel server and reimplemented Apple frameworks. It is a serious runtime project with a narrow set of things it does well today, and a long list of things it does not.
Who is it for?
Run Darling if you need a macOS command-line binary or Apple's clang toolchain on a Linux box and you can accept an incomplete framework surface. Skip it if you need working GUI apps, .mpkg installers, or a prefix on an encrypted home directory, since overlayfs is not supported there.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 23 days ago.
What is it written in?
Mainly Objective-C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Darling actually solves, and for whom

The README describes Darling as "a runtime environment that allows running macOS applications on Linux without a virtual machine." That sentence carries the whole pitch. The alternative it replaces is a macOS VM or a cross-compilation pipeline, and both cost something: a VM needs a macOS licence, disk and RAM; cross-compiling needs the source. Darling's target is the case where you have a Mach-O binary and no source, or where you want Apple's own toolchain available on a Linux host.

The audience is narrower than the tagline suggests. The README states that "many CLI tools already functional" and that "GUI application support is in active development." Those two clauses describe very different maturity levels. If your interest is running a command-line utility, a build tool, or Apple's clang against an SDK, the project is aimed at you. If your interest is opening a windowed Mac application, you are reading a roadmap, not a product. The README also notes Xcode itself does not run yet, even though its toolchain and SDKs can be installed and used.

The Mach-O loader, darlingserver, and where the syscalls land

Darling is not an interpreter and not a compatibility shim bolted onto glibc. It has two low-level pieces. The first is a Mach-O binary loader, which reads the macOS executable format that Linux kernels do not understand. The second is a userspace kernel server called darlingserver, which the README says "implements macOS's Mach IPC, POSIX, and Darwin syscall interfaces on top of Linux." So a Mach-O binary's calls into the Darwin layer are caught in userspace and translated down to Linux primitives rather than being handed to a modified kernel.

Above that sit reimplementations of Apple's frameworks: Foundation, AppKit (based on Cocotron), CoreAudio, and CoreFoundation. The README is explicit that the low-level components (XNU, libSystem, Security) are based on Apple's open-source releases, while the higher-level frameworks are being reimplemented. That split explains the project's shape. The syscall and libSystem layer inherits real Apple code, so it has a foundation to build on. The frameworks do not, so every API in them is somebody's porting work, and the surface is large.

The GUI path is the thinnest part. AppKit is backed by Cocotron, and the README mentions "an initial Metal backend powered by Vulkan translation." Metal translated to Vulkan is a plausible route to graphics on Linux, but the word "initial" is doing a lot of work in that sentence.

Installing Darling and running your first command

The README points to two install routes. Official packages for some distributions are published under releases on GitHub. The README also lists community packages in the Darling documentation, with a caution that they are "neither maintained nor vetted by the Darling team." If no official package covers your distribution, the README sends you to the build instructions in Darling Docs rather than describing a build here.

Once installed, the entry point is the darling shell. The README's first example is a Hello world that runs through Darling's syscall emulation and runtime libraries:

bash
$ darling shell echo Hello world
Hello world

If that prints Hello world, the loader, darlingserver and the basic runtime path are working. Note what the example does not prove: it does not touch AppKit, CoreAudio, or any GUI framework.

Prefixes are the next concept to understand. Darling has DPREFIXes, described in the README as "virtual 'chroot' environments with a macOS-like filesystem structure." The default location is ~/.darling, and the README says the location can be changed by exporting an environment variable of the same name. A prefix is created and initialized automatically on first use, so you do not run a separate init step. To install software into a prefix, the README uses the bundled installer:

sh
$ darling shell
Darling [~]$ installer -pkg mc-4.8.7-0.pkg -target /

That installs the Midnight Commander package the README links to. The README notes the installer is "a somewhat limited cousin of OS X's installer," and that .mpkg files are not supported yet. Packages can be listed and removed with uninstaller.

Disk images go through hdiutil inside the shell. The README's Xcode walkthrough attaches a DMG, copies Xcode.app into /Applications, exports SDKROOT, then compiles a C file with Apple's clang:

sh
Darling [~]$ hdiutil attach Xcode_7.2.dmg
/Volumes/Xcode_7.2
Darling [~]$ cp -r /Volumes/Xcode_7.2/Xcode.app /Applications
Darling [~]$ export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
Darling [~]$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang helloworld.c -o helloworld

Newer Xcode ships as .xip archives, and the README shows unxip handling those from /Applications.

The overlayfs constraint that rules out encrypted home directories

The most concrete limitation in the README is not about compatibility at all. Darling uses overlayfs to build prefixes, and the README states plainly that this means prefixes cannot live on filesystems like NFS or eCryptfs. It then spells out the consequence: "the default prefix location won't work if you have an encrypted home directory."

This is a deployment problem, not a bug you can wait out. On a laptop with an encrypted home, the default ~/.darling path fails, and the fix is to export the DPREFIX environment variable to point somewhere on a supported filesystem. That is a one-line change, but it has to be made before anything else works, and it is the kind of detail that turns a five-minute trial into a debugging session if you have not read the prefix section. Anyone evaluating Darling on a corporate Linux workstation should check this first.

The second limitation is installer coverage. .pkg files work through the bundled installer; .mpkg files do not, and the README links to a tracking issue rather than offering a workaround. Software distributed as a multi-package bundle is therefore out of reach through the normal path.

Darling against Wine, and why the comparison misleads

The README itself reaches for the analogy: DPREFIXes are "very similar to WINEPREFIXes." The structural resemblance is real. Both are per-application filesystem sandboxes, both have a default location under the home directory, both let you install software into an isolated tree. Wine's prefix is C:\-shaped; Darling's is macOS-shaped.

The difference in approach is where the analogy breaks. Wine reimplements the Windows API and its DLLs, and Windows applications are overwhelmingly PE binaries calling into Win32. Darling has to load Mach-O binaries and satisfy Mach IPC, the Darwin syscall interface, and Apple's frameworks, including a Mach port system that has no Linux equivalent and therefore needs darlingserver as a userspace stand-in. Wine's job is translating one API family to POSIX. Darling's job includes emulating an IPC mechanism that the Linux kernel does not provide at all.

That is why the two projects are not at comparable maturity despite similar ages and similar prefix designs. Wine's target API is documented, stable and heavily exercised by a large application base. Darling's framework surface is larger, partly closed in practice, and the README's own status line ("GUI application support is in active development") sets expectations well below Wine's. If you are choosing between them, you are not choosing between two implementations of the same thing.

Maintenance, licensing and what an upgrade costs you

The repository is not archived, and the last push was on 2026-09-06, which is recent enough that the project is under current development. The release cadence visible in the tags is roughly every four months: v0.1.20251023, v0.1.20260222, and v0.1.20260608. The version numbers encode dates, so you can read the cadence directly off the tag rather than guessing.

That cadence matters for upgrade cost. Darling is pre-1.0 and the framework reimplementations are moving, which means a prefix that works today may need attention after a package upgrade. The README does not document rollback, prefix migration, or a compatibility guarantee between releases, so plan for the possibility that a working setup has to be rebuilt rather than patched.

On licensing: the README states the code is under GNU GPL 3.0, and adds that "individual submodules may be licensed differently, as indicated within each of them." That second sentence is the one to read carefully. Darling's submodules include code derived from Apple's open-source releases and from projects like Cocotron, and the README does not enumerate their terms. If you intend to redistribute Darling or bundle it into a product, check each submodule's licence file rather than assuming GPL-3.0 covers the whole tree. This is not legal advice; it is a pointer to where the licence text actually lives.

Editorial conclusion

Run Darling if you need a macOS command-line binary or Apple's clang toolchain on a Linux box and you can accept an incomplete framework surface. Skip it if you need working GUI apps, .mpkg installers, or a prefix on an encrypted home directory, since overlayfs is not supported there. Verify first that an official package exists for your distribution, or follow the build instructions in Darling Docs, and check whether your target binary links against frameworks Darling has not reimplemented.

Frequently asked questions

How do I install Darling on Linux?

The README says official packages for some distributions are available under the GitHub releases page, and that build instructions live in Darling Docs. It also lists community packages in the documentation, with a caution that they are not maintained or vetted by the Darling team.

How do I install Darling on Ubuntu?

The README does not name Ubuntu specifically. It points to official packages under releases for some distributions and to the build instructions in Darling Docs for everything else, so whether an Ubuntu package exists has to be checked on the releases page.

How do I install Darling?

Install an official package from the releases page if one covers your distribution; otherwise follow the build instructions in Darling Docs. Community packages exist but the README warns they are neither maintained nor vetted by the Darling team.

How do I use Darling on Linux?

Run darling shell to enter the runtime, which the README demonstrates with darling shell echo Hello world. Software goes into a DPREFIX, a macOS-like virtual chroot that defaults to ~/.darling and is created automatically on first use, and .pkg files are installed with the bundled installer command.

Official sources

  1. darlinghq/darling on GitHub
  2. License: GPL-3.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/darlinghq-darling.svg)](https://hysenlabs.com/projects/darlinghq-darling)