Darling is a translation layer for running macOS (10.15; command-line) apps on Linux. It’s built on Darwin and is similar to WINE.
Might be interesting if, say, you want to look into maybe supporting your command-line app on macOS without having to pay Apple a few grand every-so-many years or mess with setting up a virtual machine for an operating system that doesn’t want to run on any device Tim Cook doesn’t personally profit from.
The downside is you have to build it yourself. The upside of the downside is that the build instructions* are actually really good and I didn’t run into any trouble even when building in a Distrobox container running Fedora 36 on my host system running Fedora Silverblue 37.
I did get a few warnings on launch** but I was able to install homebrew and the Xcode command-line tools without problem.
* https://docs.darlinghq.org/build-instructions.html
** https://github.com/darlinghq/darling/issues/1248
@aral really interresting, i wonder if it would allow packaging an ios app from linux, and run it on an attached ios device (a task that currently requires XCode), that would be quite awesome.
edit: unsurprisingly there are quite a few issues related to xcode open already, so it seems unable to do so (yet), but the devs are certainly aware of the interrest in that use case.
@aral Alternatively there's Multipass (https://multipass.run/). It does use VMs (hyperkit on intel, qemu on M1), but it takes care of it for you, and the setup is much simpler because it does have a pkg or you can use brew (https://multipass.run/docs/installing-on-macos).
@DiogoConstantino Multipass is neat if you want to, say, run Ubuntu on Mac but Darling lets you do the opposite: run ~macOS (Darwin) on Linux.
@aral I read it wrong :(
@DiogoConstantino No worries, Diogo :)
@aral @ianbetteridge how much advantage is there in terms of execution speed or binary size with respect to using a docker image for your tool?
I guess that the command line becomes much easier for the user to interact with…
@aral @ianbetteridge oh, sorry, I had it working in the wrong direction (confused about the comment on having to pay for Apple’s Development Program)… and knowing what Wine does, I should have known… never mind!
@bugaevc Thanks, followed.
@amdg2 @LubosD @facekapow@fosstodon.org @curioustommy
@aral Darling does not support all of macOS and it has surprising drawbacks, as discussed when I reported a SciTECO problem: https://github.com/rhaberkorn/sciteco/issues/8
@aral how much of Cocoa is implemented (excluding stub classes)?
@aral are there any significant use cases, i.e., non-GUI macOS apps that aren’t open-source and cannot just be recompiled for Linux? (The one I can think of is Xcode command-line build tools, though no idea if it’s practically usable with this.)
@aral this looks interesting