Skip to content
VibeDarlingPublic
forked from darlinghq/darling

About

Darwin/macOS emulation layer for Linux

Resources

Stars

24 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Darling logo


VibeDarling Latest Release License Donate

VibeDarling

VibeDarling is a development fork of Darling, a compatibility layer for running macOS software on Linux without a virtual machine. It builds on the work of the Darling project and the open-source components it integrates.

“Vibe” refers to vibe coding: AI coding agents are the primary development tools used in this fork. VibeDarling provides a home for that development approach, with its own testing and review process. Upstream Darling has expressed reservations about AI-generated contributions, while leaving room to review smaller changes with supporting tests. Contributions to this fork are reviewed here; acceptance here does not imply upstream acceptance.

Quick links

Releases • Bug tracker • Known issues • Development notes • Upstream Darling documentation

Project status

The goal of this fork is to run unmodified macOS applications distributed through Homebrew casks and exercise their core workflows. Work spans ARM64 and x86_64 loading, Darwin runtime services, AppKit, Swift interoperability, and graphics. Application compatibility is experimental and depends on the app version, architecture, frameworks, and runtime build. Installing an app, resolving its symbols, or opening a window does not establish that its workflows work.

Darling consists of a Mach-O binary loader and a userspace kernel server (darlingserver) implementing Mach IPC, POSIX, and Darwin syscall interfaces on Linux, alongside framework implementations including Foundation, AppKit (based on Cocotron), CoreAudio, and CoreFoundation. Low-level components draw on Apple's open-source releases. Graphics work includes X11 and Wayland backends and Metal-to-Vulkan translation; these remain areas of active development.

See known issues for recorded limitations and Darling Applications for the application viewer and guest Homebrew integration. That integration has additional payload and prefix setup requirements; it is not a general-purpose Homebrew installer.

Getting started

Packages

See this fork's release page for release notes and any attached packages. Entries may be source-only; if no binary package is attached, use the source setup below. Check the architecture and version of any package you choose: a release does not necessarily contain the latest changes on master.

The original Darling project's releases and community packages are separate distribution channels. Do not assume they include VibeDarling changes.

Building from source

Start with the dependencies described in the upstream build instructions, then read this fork's local development notes. Upstream instructions provide background; build and architecture differences in this fork may require additional setup.

Clone VibeDarling with its submodules and fetch the Swift Git LFS payloads (requires Git LFS):

git clone --recurse-submodules https://github.com/VibeDarling/darling.git
cd darling
git -C src/external/swift lfs pull

Keep this checkout's origin pointing at VibeDarling when initializing submodules: their relative URLs resolve against that remote. Use a separate remote for pushing to a personal fork. For builds alongside an existing checkout, follow the independent-clone guidance in the development notes.

After installing the build dependencies, configure an out-of-source Ninja build:

cmake -S . -B build -G Ninja
cmake --build build
ninja -C build -n

Check that the final dry run reports no remaining work. The development notes also describe staging a runtime with DESTDIR and testing it in a disposable prefix before installing it system-wide.

Contributing

Submit issues and pull requests to VibeDarling, with component fixes in the corresponding VibeDarling submodule repository. Read the issue collaboration protocol before picking up an issue; it describes work claims, app testing, issue linkage, and review requirements.

For compatibility reports, include the application version and architecture, Linux environment, Darling and submodule revisions, reproduction commands, and logs. State whether the app installs, loads, launches, and completes the workflow you tested. Keep Homebrew and application binaries unmodified when assessing compatibility. The framework-gap triage guide can help investigate missing-library failures.

License

The main project is licensed under the GNU GPL 3.0. Individual submodules and bundled components have their own licenses and notices; consult their repositories when building or distributing a runtime.

Usage

Prefixes

Darling has support for DPREFIXes, which are very similar to WINEPREFIXes. They provide a macOS-like filesystem structure for installed software and its data. The default DPREFIX location is ~/.darling, but this can be changed by exporting an identically named environment variable. A prefix is automatically created and initialized on first use.

Please note that we use overlayfs for creating prefixes, and so we cannot support putting prefix on a filesystem like NFS or eCryptfs. In particular, the default prefix location won't work if you have an encrypted home directory.

Hello world

Let's start with a Hello world:

$ darling shell echo Hello world
Hello world

Congratulations, you have printed Hello world through Darling's OS X system call emulation and runtime libraries.

Installing software

Working with .pkg files

You can install .pkg packages with the installer tool available inside shell. It is a somewhat limited cousin of OS X's installer:

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

Darling does not support installing .mpkg files yet

The Midnight Commander package from the above example is available for download.

You can uninstall and list packages with the uninstaller command.

Working with DMG images

DMG images can be attached and detached from inside darling shell with hdiutil. This is how you can install Xcode along with its toolchain and SDKs (note that Xcode itself doesn't run yet):

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 [~]$ echo 'void main() { puts("Hello world"); }' > helloworld.c
Darling [~]$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang helloworld.c -o helloworld
Darling [~]$ ./helloworld
Hello world

Congratulations, you have just compiled and run your own Hello world application with Apple's toolchain.

Working with XIP archives

Xcode is now distributed in .xip files. These can be installed using unxip:

cd /Applications
unxip Xcode_11.3.xip

About

Darwin/macOS emulation layer for Linux

Resources

Stars

24 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages