HOME

TheInfoList



OR:

Darling is a free and open-source macOS
compatibility layer In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With so ...
for Linux. It duplicates functions of
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
by providing alternative implementations of the libraries and frameworks that macOS programs call. This method of duplication differs from other methods that might also be considered emulation, where macOS programs run in a
virtual machine In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized h ...
. Darling has been called the counterpart to
WINE Wine is an alcoholic drink typically made from fermented grapes. Yeast consumes the sugar in the grapes and converts it to ethanol and carbon dioxide, releasing heat in the process. Different varieties of grapes and strains of yeasts are m ...
for running macOS apps. The project started in the summer of 2012 and builds on a previous project, named maloader, which was discontinued due to a lack of time. The layer has been shown to work with many console apps, such as
Midnight Commander GNU Midnight Commander (also known as mc, the command used to start it, and as mouseless commander in older versions) is a free cross-platform orthodox file manager. It was started by Miguel de Icaza in 1994 as a clone of the then-popular Nor ...
, The Unarchiver,
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
, etc. on the layer, but it also has basic support for graphical applications based on the Cocoa framework. Darling has the ability to extract Apple Disk Images. The project aims to support
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also include ...
applications in the future.


Architecture

At the entry of the Darling system is a loader for Mach-O binaries, the executable format for Apple's
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s. Darling's predecessor, maloader, presented a maximalist approach to the problem by trying to replicate everything that Apple's dynamic library loader dyld does. This proved to be hard, and since a 2017 "Mach-O transition" Darling has been using a lightweight loader just enough to launch the open-source Apple dyld instead. To provide the macOS binaries with a
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
, Darling uses a modified XNU kernel wrapped into a Linux
kernel module In computing, a loadable kernel module (LKM) is an object file that contains code to extend the running kernel, or so-called ''base kernel'', of an operating system. LKMs are typically used to add support for new hardware (as device drivers) and/o ...
. This module handles the typical job of a
Mach kernel Mach () is a kernel developed at Carnegie Mellon University by Richard Rashid and Avie Tevanian to support operating system research, primarily distributed and parallel computing. Mach is often considered one of the earliest examples of a microk ...
, mainly Ports IPC handling. Some licensing issues exist in the darling-mach module, as the team are adding
GNU GNU () is an extensive collection of free software (383 packages as of January 2022), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operat ...
GPL The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
modifications to the APSL kernel. Higher than the kernel is the root environment. Darling, like WINE, supports chroot prefixes, implemented using the Linux
overlayfs In computing, OverlayFS is a union mount filesystem implementation for Linux. It combines multiple different underlying mount points into one, resulting in single directory structure that contains underlying files and sub-directories from all sou ...
(as opposed to path translation in WINE). PID, IPC, and UTS namespaces are used to create a
container A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping. Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
for the Darwin system inside. The frameworks and system libraries in Darling are, to the best possible extent, based on
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the w ...
released by Apple. The Mach-O transition allows these frameworks to be built more easily, because they are now built as the Mach-O format they were intended for. To fill in the gaps for many higher-level frameworks like Cocoa, Darling uses code from Cocotron, ApportableFoundation, and
GNUstep GNUstep is a free software implementation of the Cocoa (formerly OpenStep) Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project. GNUste ...
.


License

The larger Darling system is based on many components which use various licenses, all of which are open-source. The primary license is GPLv3.


External links

* https://www.darlinghq.org/ * https://github.com/darlinghq/darling


References

{{reflist, 30em Compatibility layers Free system software Linux emulation software Free software programmed in C 2013 software