
Darling – Run macOS software on Linux - peter_d_sherman
http://darlinghq.org/
======
dang
2019:
[https://news.ycombinator.com/item?id=19772322](https://news.ycombinator.com/item?id=19772322)

2016:
[https://news.ycombinator.com/item?id=12854895](https://news.ycombinator.com/item?id=12854895)

------
extro
Unrelated comment, but am i the only one who gets annoyed by the "does it runs
safari?" or "does it runs adobe?" questions? It seems a significant portion of
"readers" can't or won't actually read, which is pretty ironic on a news site.
I hate this.

~~~
butterthebuddha
Most people are here to have discussions, and not necessarily read news.

------
Qasaur
If this works with Adobe Creative Cloud, then moving to a Linux distro has
suddenly become much more attractive.

~~~
toastal
As far as raster graphics, Krita, GIMP, and Darktable can get you professional
results without needing to resort to closed-source software.

~~~
cpach
My impression is that Krita is for digital painting and not for photo editing,
is that not the case?

~~~
virtualritz
This is correct. I would say there is still no PS alternative on Linux.

I use Natron a lot for retouching but few people will know about or consider
this because it is aimed at film compositing.

But if one wanted to create something better than PS on Linux, looking at
professional compositing apps (Nuke, Fusion, etc.) and their OSS clones like
Natron would probably be a good starting point.

------
dfabulich
I just want to run Xcode on AWS. Even just the CLI tool xcodebuild would be
fine!

~~~
saagarjha
Parts of the command line toolchain work already. Try it!

~~~
mikkelam
Wow is that true? A lot of people could save a shit ton of money for that CI
and automatic tooling for macOS, iOS and so on

~~~
boudin
I'm discovering this too, and quite eager to try, being able to build iOS apps
on Linux would be a big step forward for CI/CD.

I just found this documentation from Godot:
[https://docs.godotengine.org/en/stable/development/compiling...](https://docs.godotengine.org/en/stable/development/compiling/cross-
compiling_for_ios_on_linux.html)

Actually, there's an xcode example in the doc as well:
[https://wiki.darlinghq.org/what_to_try](https://wiki.darlinghq.org/what_to_try)

~~~
ratmice
Note that this appears to require installation of xcode, I recommend reading
its license terms which require being run on apple hardware. Only very old
versions of the SDK lack those license terms.

------
cutler
"Does it support GUI apps? Almost!". In what sense can this be considered to
be "running MacOS software" then?

~~~
kalessin
A lot of software doesn't have a GUI, even on macOS?

~~~
filleduchaos
Apart from the Xcode toolchain, I cannot for the life of me think of a single
macOS application that both has no GUI _and_ isn't already cross-platform or a
Darwin/BSD version of a tool that already exists on Linux.

I'd actually like to know what non-Xcode command line apps you (or anyone else
reading this!) is using that explicitly target macOS and nothing else - I've
used Macs for only about five years and primarily for dev work, so maybe
there's a treasure trove of cool stuff I'm missing.

~~~
Wowfunhappy
I mostly had the same thought as you, but one thing I imagine some people
might want is access to Apple's own command line tools, particularly those who
prefer using Linux but need to work with Apple formats for some reason.

There's osascript for executing Applescript code, plutil for working with
plists, and diskutil for making DMGs. Those are just off the top of my head,
there's probably others too.

~~~
filleduchaos
Hmmm - that's all fair! Though I'm not very sure why one would want to execute
Applescript on Linux - scripts are typically either so platform-integrated
that they're useless on non-Mac platforms or so generic that they're trivially
replicated in languages like Python or Ruby.

I'd consider diskutil and plutil vaguely part of the "Xcode toolchain" (as in,
using them (especially from outside macOS) is largely geared towards app
development). That's certainly a huge use case for Darling - I actually think
it would be interesting if they explicitly (but maybe not very loudly?) aimed
for giving people access to iOS/macOS development without Mac hardware, rather
than trying to be a general-purpose emulation layer.

------
0az
Nice.

Off topic, but does anyone know of any good IINA alternatives for Linux? I
have not found anything that beats it in terms of polish.

VLC is nice, but IINA does one thing really well, and is based on MPV, with
all of its powerful configuration options and nice keybinds.

~~~
sunaurus
I've never used IINA, but I'm wondering why you don't just use mpv on Linux?
I've been using mpv for years and I've never had any issues with it.

~~~
1_player
IINA is much more than mpv. Sure, it uses mpv underneath, but the selling
point of IINA is a well thought out UI with just enough features but not too
many (totally subjective, of course)

~~~
sunaurus
> ...the selling point of IINA is a well thought out UI with just enough
> features but not too many

That's exactly how I would describe the default mpv UI :)

------
aasasd
After learning of the existence of a bunch of compatibility layers, I'm now
occasionally pining for a Linux→Mac one. Because dealing with BSD software,
aka ‘unknown option --help’, is a source of irritation sometimes. Plus there's
actually open-source Linux software that doesn't have open-source analogs on
Mac (not that I'll remember right now what it was).

But then again, Linux has /proc and a boatload of common APIs beyond kernel
calls.

~~~
trasz
The —help is not particularly useful when you have proper man pages.

~~~
rkeene2
It is often less verbose than a man page so can be seen entirely without a
pager, which is often all you need when you are looking for a reminder of that
periodically used option. Certainly having both options (man page and inline
help) is better than having only one option.

~~~
trasz
If you can’t find what you need in the man page, because of the bloat, well,
it’s the bloat that’s the problem, not the lack of —help.

~~~
CameronNemo
Nak. Help output can be more concise because it does not have to explain what
the command is used for, does not have to enumerate every option for a
particular flag, does not need a "See Also" or "Examples" section, etc.

~~~
trasz
It's what the SYNOPSIS section is for, at the top of the man page, so you
don't need to scroll down in the pager.

In a more general sense, though, this is why BSD systems generally try to
avoid bloat in the core utilities. It's not about the code size - it never was
- but rather the overhead on maintainers and users.

------
emmelaich
I'd love to know (of popular software) what works well, and what doesn't.

Is there such a list?

~~~
rixrax
And most importantly (to me), does Adobe Lightroom, Premiere and Photoshop run
under this?

Frankly, those are about the last pieces of desktop software that prevent me
to switch to Linux.

~~~
dheera
I'm able to do almost everything I need to with Darktable, Kdenlive, and GIMP.

------
antoineMoPa
Does this work with Safari? It would be very useful for cross browser testing.

~~~
saagarjha
No GUI apps (well, kinda). But you can run WebKit on Linux already, if that
helps.

~~~
butz
Could you elaborate on running WebKit on Linux? Is it the same engine that
latest Safari release is using?

~~~
saagarjha
Safari mostly uses the open-source WebKit, except it of course sets all the
Mac defines and Apple-specific feature flags, and there’s a bit of extra code
sprinkled in internally. On Linux you can get something similar but not
exactly the same by using one of the WebKit browsers, such as GNOME Web.

~~~
butz
Thanks, just installed Epiphany and was able to reproduce issue with flexbox
that only Safari had. Somehow I thought that Safari and WebKit browsers were
using a bit different forks of WebKit. That proves me wrong.

~~~
saagarjha
They are; it just might not be different enough for your purposes.

------
fithisux
I had hopes for Puredarwin :-( not an emulation layer. And I hoped Apple
sponsored a community distribution

~~~
kick
Why would Apple sponsor something like this?

PureDarwin isn't even Linux.

------
peter_d_sherman
Also:
[https://en.wikipedia.org/wiki/Darling_(software)](https://en.wikipedia.org/wiki/Darling_\(software\))

~~~
archanox
[https://github.com/darlinghq/darling/issues/542](https://github.com/darlinghq/darling/issues/542)

This seems like it's a big deal.

------
ashton314
Do my eyes deceive me? O.o What trickery is this?!

If I can run iTerm2 on Linux… snap. Um, I would seriously consider switching
entirely over to Linux.

My killer apps that make it hard for me to switch:

\- iTerm2 (must-have)

\- OmniGraffle (really nice, but not _critical_ I guess)

\- Little Snitch (I understand there are alternatives, but LS is so nice!)

\- MoneyWell (budgeting—haven't found anything better)

If anyone has any experience running those apps under Linux, please let me
know.

~~~
moondev
iTerm2 is is the main thing holding you back? Give tilix a try and you will
forget all about iTerm2

[https://gnunn1.github.io/tilix-web/](https://gnunn1.github.io/tilix-web/)

Then you can also enjoy:

\- running containers natively without a clunky VM

\- KVM virtualization - say goodbye to virtualbox

\- middle-click paste - sounds odd but is really intuitive

\- infinite desktop customization

\- level up your linux skills - nothing does this faster than running linux as
your daily driver

\- no longer at the mercy of one company potentially removing x86 for ARM
because it benefits them not you
[https://www.theverge.com/2020/3/27/21196611/arm-macbook-
desk...](https://www.theverge.com/2020/3/27/21196611/arm-macbook-desktop-
apple-2021-release-date)

~~~
petepete
Both iTerm and Tilix are nice but once I tried Kitty I never looked back.
Cross platform, too.

[https://github.com/kovidgoyal/kitty](https://github.com/kovidgoyal/kitty)

~~~
mikkelam
I'm really happy with alacritty
[https://github.com/alacritty/alacritty/](https://github.com/alacritty/alacritty/),
blazingly fast and if you're happy with living inside a terminal multiplexer
it's really a good experience

~~~
mab122
I was using it before and I find it heavier than kitty. Now I am running kitty
mainly because of wayland support and I did switch to wayland.

------
thelittleone
Perfect timing for me. Macbook Pro 2017 logic board died and can't get it in
for repair due to shutdowns. So installed Linux Mint on Thinkpad T420. This
will help me a lot, I'd be pleased if I could make a permanent shift from Mac.

Is this something Apple is likely to try and break constantly with software
updates?

~~~
Rolcol
This project is nowhere near the level of Wine, if that's what you're
expecting. They admit they have basic experimental support for simple GUIs.
Anything command-line is highly likely on Linux anyway.

------
uranium235
This has been around at least since 2015 ive been watching it a bit good to
see it's getting some work

~~~
lathiat
I've been wanting to get it to execute the bonjour conformance test on linux
so I can do CI of Avahi against it. I didn't have any luck last time might be
worth a look again.

------
steeve
Is it possible to run it without the kernel module? That would make it way
simpler to use with docker!

------
mikkelam
I honestly just last monday moved from MacOS on my desktop (don't ask) to an
ubuntu machine, so that I can use my nvidia card. I'm already missing a few
apps, this looks really neat! I'm really hoping they work out how to get
bigger apps running nicely

------
jamesu
I've used this to successfully run legacy 32bit commandline tools, though I
think it's still too unstable to rely on it in a production environment.

I think there's been a notable upsurge in interest though, so I expect good
things to happen with it this year.

------
vaer-k
Missed opportunity to call it Beer, which would have paired very nicely with
Wine

~~~
bozzcl
Might as well call it Cheese then.

~~~
abiogenesis
You can't run homebrew on cheese though.

------
buzzdenver
I know it's tangential, but get a TLS cert!

~~~
kiwijamo
Surprising to see a site for geeks in 2020 without TLS!

------
kinleyd
I don't suppose I should get my hopes up for macOS DAWS? That would involve
resolution for both GUI and audio latency.

------
butz
I had high hopes of running Sketch on Linux.

------
KingOfCoders
TLDR; "Does it support GUI apps? Almost! This took us a lot of time and
effort, but we finally have basic experimental support for running simple
graphical applications."

~~~
danieldk
Don't get your hopes up (too much) though. They will have to rely on an open
source reimplementation of Cocoa (e.g. Cocotron or GNUStep) to support GUI
apps. These are a long way from providing a full implementation of the macOS
frameworks. You cannot just take a random Objective-C or Swift macOS app and
recompile it using these open source libraries. So, binaries is even much
further away. Even Wine, which has seen two decades of development (including
from companies such as CrossOver), only supports a small subset of Windows
applications very well.

Of course, it might be possible to re-use macOS' frameworks, but Apple would
probably sue anyone who tries to offer that into oblivion.

BTW. I think this is a great project, but there are some people who seem to be
rooting for using this for running Creative Suite on Linux. That won't happen
anytime soon, if ever. Wine is your best shot.

------
CMCDragonkai
Would love to run monodraw on Linux

------
imhoguy
Linux is eating the World /s ;)

------
sys_64738
Will it consume as much RAM as running OS X apps does on a real Mac?

~~~
agucova
Given it's a translation layer, and it doesn't modify the actual code, I would
imagine memory usage would be very similar. (Or higher)

------
DeathArrow
Does this allow building iOS apps on Linux? I'd love to be able to use WSL2 to
build iOS apps under Windows 10.

~~~
unixhero
I think you're taking this a step far. What does Windows have to do with this?

~~~
abiogenesis
Emulception: Run darling on the Linux subsystem on Windows 10.

~~~
wtracy
WSL doesn't meet the project's requirements:

[https://github.com/darlinghq/darling/issues/260](https://github.com/darlinghq/darling/issues/260)

~~~
yellowapple
On the other hand, it's a bit weird that Darling requires a kernel module.
Given the name (darling-mach) I guess it's doing something to make Linux look
more like XNU, but it's surprising that the Darling team has to do that within
Linux itself (given that Wine is apparently able to make Linux look like NT in
userspace).

~~~
Nullabillity
Not sure it's the underlying reason, but for a long while Go would use raw
syscalls on Darwin, which is something that Windows has explicitly sabotaged
for ages. It's a lot easier to trap a library call from userspace than a
syscall.

~~~
Tobu
If this documentation is accurate, Darling doesn't support raw syscalls
either:

[https://wiki.darlinghq.org/documentation:system_call_emulati...](https://wiki.darlinghq.org/documentation:system_call_emulation)

Their Linux kernel module does seem to be XNU based, but it feels like poor
design / a rushed job to run it as a Linux kernel module instead of isolating
it in userspace.

~~~
LubosD
Rushed job? We've been at this for almost 8 years. We tried doing this without
a kernel module for several years, but it just wasn't feasible.

You see, people think XNU is just another kernel, but it's very different from
Linux or the Windows kernel. The only reason why we need a kernel module is
Mach IPC. But this IPC is so critical and omni-present that a user-space
process cannot even do a sleep() without using it. Even event loops in every
GUI application use Mach IPC on the lowest level.

There is no way of implementing the full semantics of this IPC mechanism
without a help from the kernel. For example, Mach IPC involves making direct
memory copies between processes.

So even if we decided to take the "wineserver" approach, which would set us
back by several years, the result would be super slow and not very compatible.

Also the userspace on macOS is quite different from other operating systems,
which is why it's all taking us so long. MacOS is a bloated system with a huge
number of layers sitting between the UI toolkit and the windowing server.

Imagine creating Wine from scratch. How much functionality would you need to
implement to provide the correct behavior for a super-simple native GUI
application? Probably just USER32, GDI32 and KERNEL32 would do. On MacOS, this
is AppKit, QuartzCore, Foundation, CoreFoundation, libobjc and libSystem
(which includes huge components such as libdispatch and emulating complex APIs
such as kqueue).

FYI: The reason why we don't emulate raw syscalls is because this is not
possible from kernel modules, unless you resort to techniques that could
easily destabilize the whole system.

~~~
yellowapple
While I agree with your overall point (and agree that it's unfair to
characterize the hard work y'all have been doing as a "rushed job")...

> How much functionality would you need to implement to provide the correct
> behavior for a super-simple native GUI application? Probably just USER32,
> GDI32 and KERNEL32 would do. On MacOS, this is AppKit, QuartzCore,
> Foundation, CoreFoundation, libobjc and libSystem (which includes huge
> components such as libdispatch and emulating complex APIs such as kqueue).

I don't think "number of APIs" is the reasonable benchmark for how difficult
it might be to get a GUI application up and running. It's totally possible
that macOS might more eagerly split out functionality into different systems
while Windows combines that same functionality into relatively few. I don't
know how true that is, but it'd be interesting to compare based on the depth
of those libraries rather than just the quantity.

And from what I understand about Wine, all three of those Windows libraries
are incredibly complex and convoluted, and even to this day have gaps in their
Wine equivalents. Assuming macOS' greater quantity of necessary libraries add
up to the same degree of API surface to be reimplemented, what y'all are doing
is impressive, to say the least (and sure, Wine's more usable right now, but
Wine also had a decade or two of a head start).

------
bloody-crow
> The name Darling is a combination of “Darwin” and “Linux”.

I'm sorry, what? How?

~~~
dansman805
Take the first three letters of each name; Darwin gives you "dar" and Linux
gives you "lin". Combining these, you get "darlin". Then, presumably the
authors wanted a dictionary word for their name, so they chose darling.

~~~
peatmoss
Obviously the “g” at the end is for GNU ;-)

