top | item 29813679

Darling – Run Mac apps on Linux

652 points| tomrod | 4 years ago |darlinghq.org

199 comments

order
[+] gh123man|4 years ago|reply
Has anyone been able to use darling for iOS CI jobs yet? Admittedly I haven't researched this in a while, but one of the biggest hurdles in large scale iOS development is sane DevOps infrastructure. I know due to Apple's TOS that you will never be able to build, sign, and distribute your app on non-Apple hardware. But i'd love to use darling to run unit tests/CI jobs on commodity cloud infrastructure.

Even if you do get dedicated mac instances, managing them is a bit of a nightmare since MacOS isn't designed to be headless.

[+] saurik|4 years ago|reply
I was doing this--using Darling to run the various tools from Xcode on Linux so I could build one of my macOS projects--five years ago and it worked great, but I haven't done it much since as at some point I started using MacStadium to rent Mac Minis. (I want to start using Darling again though, on the assumption that it is still working for running more GUI-oriented build tools--stuff like ibtool and actool, which I have sadly started to need, and now particularly the actual xcodebuild stuff, as Flutter is forcing me into that world due to its usage of CocoaPods... I hate it :/--from newer versions of Xcode.)
[+] yjftsjthsd-h|4 years ago|reply
For unit tests, can you "just" build on Linux natively? I'm pretty sure Swift and Objective C are supposed to both work on Linux, although I assume library/API surface limits that.
[+] freedomben|4 years ago|reply
Just thought it may be worth mentioning if there are devs from the project here, but Darling is one of the efforts that I would sponsor/donate to (just small amounts for now as I haven't made my millions yet ;-) if there were a more defined road map with milestones/goals.

This is an amazing and important goal! Thank you so much for dedicating your time and efforts to this!

[+] dvirsky|4 years ago|reply
Looks like an incredible project, but if GUI is not working, what is the current use case for it? Command line apps are usually open source and can be compiled in either system. What are people using this for in day to day work?
[+] stuaxo|4 years ago|reply
GUI will come eventually.

Some Dev commandline tools and compilers are starting to work, so these kind of environments will probably come first which will provide better performance than running under virtual machines.

[+] dheera|4 years ago|reply
> what is the current use case for it

This is Hacker News, not Product Hunt

Maybe by posting here they will get more people to help make GUI happen

[+] jedisct1|4 years ago|reply
Zig has out of the box support for Darling, in order to directly run cross-compiled macOS apps on Linux.
[+] stuaxo|4 years ago|reply
There's still a long way to go, especially if you want GUI apps.

If you want to contribute there is an active community on Discord.

[+] toastal|4 years ago|reply
If you want to contribute, you must agree to Discord's terms of service and data collecting. Projects need to stop doing this as the only option.
[+] teh_klev|4 years ago|reply
> Can I run Darling on Windows using WSL?

> With WSL 2, yes! See the documentation for more details.

https://docs.darlinghq.org/wsl-build.html

Darwin on Linux on Windows...spins totem really fast.

Who would've thought this would be a thing 7-8 years ago?

[+] teilo|4 years ago|reply
Good luck with supporting Mac GUIs. It's a constantly shifting target. Carbon is gone, but now Cocoa isn't always Cocoa because you also have to support SwiftUI, which is itself a moving target.
[+] Uehreka|4 years ago|reply
I thought SwiftUI was an abstraction layer on top of Cocoa, Cocoa Touch, etc. so you could reuse code between executables. Is that not the case?
[+] mastazi|4 years ago|reply
This project needs more contributions! I hope being on the HN home page will help
[+] DyslexicAtheist|4 years ago|reply
stupid question because I have not touched a Mac since 1999. What kind of apps are you using on Mac that if you were forced to switch to Linux you feel that you can't live without?

the appeal back then (and from I hear people say until today) was always how everything is neatly integrated. a coherent system from the hardware all the way up the stack. not sure if that is overselling it but at least that's how I understand is what people are happy to pay for.

[+] input_sh|4 years ago|reply
I've never used a mac, but I do envy mac users for some of the productivity-focused tools like Alfred, Bear, Hazel, Keyboard Maestro, and similar.

While I do have some alternatives on my Linux system (Obsidian, Espanso, uLauncher, a bunch of scripts), they're not as integrated and somewhat of a pain to maintain properly.

[+] linkandzelda|4 years ago|reply
I was an Apple user since 2008 until 2018, when I finally switched to Linux full time. At the time of my first switch attempt it was 2014, but I didn't realise how finely ingrained Apple's OSX workflow was in my mind. I had no problem finding replacement apps, but what was hard was using them and trying to build a comfy desktop environment. Essentially it took me from 2014 til 2018 to transition from OSX specific software to fully open source CLI apps. These days I run Arch and the only GUI app is Chromium. Not counting my i3wm and the lemon bar. It was a fun journey with with some challenging moments!
[+] gurkendoktor|4 years ago|reply
For me: Git Tower, MoneyMoney (German banking app, absolutely fantastic), Fantastical, to some degree also OmniFocus.

Plus first-party apps like Safari with its fluid trackpad gestures, Photos with its iCloud integration, and of course Xcode, because being able to build/debug things for macOS/iOS is a bonus feature I can offer as a developer.

The list is a lot shorter than 10 or 15 years ago. Most new apps that come out are Electron, but even then there's sometimes no Linux port (Trello, WhatsApp).

[+] innocentoldguy|4 years ago|reply
The apps that keep me using Apple products are Scrivener, Logic, Studio One, Final Cut, Photoshop, and Illustrator. There are a few others too.

I also like the integration between my phone and my computer. For example, taking a picture on my phone and having it show up in Photos automatically, the ability to copy and paste between my phone and computer, the ability to make phone calls on my computer, the ability to share browser windows between my phone and computer, and the ability to use my iPad as a second monitor.

I've been using Linux since Slackware's first release, and still use it today, but it isn't my main desktop for these reasons.

[+] sorisos|4 years ago|reply
Ableton live (music application) - the only reason I still have mac. I tried to switch to Bitwig that is similar and runs on linux, but I have not had the time to develop a workflow with it.
[+] wirrbel|4 years ago|reply
By now the appeal is a classical desktop user interface that has been micro-optimised for the past decades (instead of rewrites like Gnome).
[+] u-rate|4 years ago|reply
Any creative tool (audio, video, picture), that doesn’t randomly crash after 30 minutes
[+] wetpaws|4 years ago|reply
Aside from probably iTerm there are none.
[+] VTimofeenko|4 years ago|reply
Asking out of inexperience with Mac command line tools ecosystem: outside of CI mentioned in the neighboring comments - are there any tools that could be useful on a desktop Linux?
[+] OnlyMortal|4 years ago|reply
Interesting. I expect the display postscript (now PDF) would be tricky with its compositing in particular.

I doubt Ghostscript would be up to it performance wise as much of the DPS is backed by hardware nowadays.

Anyway, good luck!

[+] monocasa|4 years ago|reply
Does this still require a kernel driver to intercept syscalls?

It'd be nice to have a gvisor/UML like option that would let it run entirely in user space.

[+] als0|4 years ago|reply
Yep, it looks like they have a kernel module for handling the Mach subset of syscalls.

> Emulating XNU system calls directly in Linux would have a few benefits, but isn't really workable. Unlike BSD kernels, Linux has no support for foreign system call emulation and having such an extensive and intrusive patchset merged into Linux would be too difficult. Requiring Darling's users to patch their kernels is out of question as well.

I wonder what such a patch set might look like.

[+] tomrod|4 years ago|reply
Excited to see this. Hopefully this resolves the application portability issue for Linux (e.g. Microsoft Office native apps)
[+] marcodiego|4 years ago|reply
Considering POSIX/UNIX heritage of both Max and Linux, disregarding user space libs, I'd estimate this to be a much smaller effort than Wine. So, besides GNUStep, Is there any project to reimplement open-source portable MacOS user space libs?
[+] PaulDavisThe1st|4 years ago|reply
> disregarding user space libs

most macOS software uses the APIs offered by userspace libs almost exclusively. They represent a huge and vast interconnected set of libraries, developed over decades. Maybe not quite as large as the entire Windows API, but similar in scope.

[+] microtonal|4 years ago|reply
There is a common heritage. On the other hand, the low-level libraries also depend a lot on Mach features like message passing.
[+] miller_joe|4 years ago|reply
Can it run Messages.app? This is the one thing that constantly gives me pause on the linux-desktop switching

EDIT: It says "some" GUI apps are working / experimental, so probably Messages is not there yet, just curious if anyone has tried.

[+] divbzero|4 years ago|reply
Or Preview.app? That is the other macOS app that I use all the time.
[+] saagarjha|4 years ago|reply
Messages would require getting all of Catalyst to work, so I would assume it's one of the more complicated ones to support.
[+] qalmakka|4 years ago|reply
The only pain point I have about Darling is that it is way more bothersome to install compared to Wine due to the fact it uses a kernel module. Except that, it is great.
[+] bifrost|4 years ago|reply
This is cool, would love to be able to use this on FreeBSD as well.
[+] hitpointdrew|4 years ago|reply
Oh man, if we can have iTerm2 on Linux I will be pumped.
[+] spitfire|4 years ago|reply
Hopefully they extend this back to NeXTStep interoperability. I would love to be able to run Quantrix and FrameMaker.