[HN Gopher] Darling: Run macOS Software on Linux
       ___________________________________________________________________
        
       Darling: Run macOS Software on Linux
        
       Author : doener
       Score  : 337 points
       Date   : 2023-11-26 17:52 UTC (5 hours ago)
        
 (HTM) web link (www.darlinghq.org)
 (TXT) w3m dump (www.darlinghq.org)
        
       | doener wrote:
       | Via https://news.ycombinator.com/item?id=38421862
        
         | pvg wrote:
         | https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
        
       | dave4420 wrote:
       | Only runs on x64 chips.
       | 
       | Presumably only runs macOS binaries built for intel? (i.e. not
       | apple silicon.) I can't find if it says anywhere.
        
         | saagarjha wrote:
         | Yes, it doesn't do any emulation.
        
         | gwbas1c wrote:
         | FWIW:
         | 
         | All Macs have been 64-bit for at least 11 years, if not longer.
         | (My MBP from 2012 was 64-bit.)
         | 
         | Apple dropped 32-bit support a long time ago. Not sure of the
         | exact date, but sometime around 2015-2017 I had to port a Mac
         | application to 64-bit because the upcoming release of MacOS was
         | going to drop all 32-bit support.
        
           | dave4420 wrote:
           | Yeah... I wasn't really getting at it not working on 32bit,
           | more getting at it not working on arm.
           | 
           | If it doesn't acquire the ability to run arm binaries, it
           | will be a retro computing platform in a couple of years. (And
           | it would have to emulate apple's cpu extensions, even when
           | running on arm chips, yes.)
        
       | gamesbrainiac wrote:
       | I wonder if there is a way to run iOS applications on Android.
       | I'd kill to be able to use the OneNote app on my Samsung galaxy
       | tab S8. Samsung Notes are great, but not very portable.
        
         | tomaskafka wrote:
         | Onenote is normally available on Android, isn't it?
        
           | supermatt wrote:
           | It's lacking many features on android:
           | https://support.microsoft.com/en-us/topic/comparing-
           | educatio...
        
         | speps wrote:
         | This project is the most promising and it does what you say,
         | except they're starting with iOS 1.0 so you'll have to be
         | patient!
         | 
         | https://touchhle.org/
        
           | Klonoar wrote:
           | Isn't this one very explicit about only aiming to cover old
           | lost games...?
        
           | saagarjha wrote:
           | There are no plans to support any recent version of iOS
        
         | vitorgrs wrote:
         | Fun fact, Meta (FB) actually had a tech to "emulate" iOS apps.
         | Facebook and Instagram for Windows/WP once upon a time was an
         | iOS emulated app.
        
           | smileybarry wrote:
           | IIRC it was actually Microsoft's Windows 10 Bridge for iOS
           | that enabled this: (and sadly it's dead now)
           | 
           | https://web.archive.org/web/20170707092302/https://developer.
           | ..
        
             | LegNeato wrote:
             | No it wasn't it was osmeta
             | https://techcrunch.com/2013/04/10/has-facebook-quietly-
             | acqui...
        
         | ClassyJacket wrote:
         | But there's a OneNote app for Android...
        
       | jaxr wrote:
       | As a long time Linux user, it's always felt kind of unjust that
       | all good Linux software is ported to other os, but there is no
       | reciprocity. I do understand all the nuances, but Apple and
       | especially MS seem to get a lot out of the GNU/Linux ecosystem
       | and give very little in return.I would appreciate using some open
       | source software released for Mac in my Linux desktop. Thanks to
       | the developers of this project! Will give it a spin...
        
         | frutiger wrote:
         | > Apple and especially MS seem to get a lot out of the
         | GNU/Linux ecosystem and give very little in return
         | 
         | LLVM/Clang has been a huge boon to the GNU/Linux ecosystem, and
         | dragged gcc into the modern era, and was largely funded Apple
         | for many years.
        
           | deaddodo wrote:
           | People seem to forget that GCC was flopping around on C++11
           | for a long while until clang started pushing things along.
           | 
           | Not to say they've fallen behind, just that a competitor
           | clearly kicked things back into gear. Same as Firefox and
           | Webkit-based browsers did for the many years of IE6's
           | monopoly.
        
           | pasc1878 wrote:
           | Not really now.
           | 
           | If you use Windows or macOS then you can open all your time
           | using the OS suppliers tools or tools bought from third
           | parties.
           | 
           | In macOS you can use UNIX but it is the FreeBSD world so no
           | GNU or Linux there.
           | 
           | In windows if you want Unix then WSL which is GNU/Linux but
           | you can easily work in plain Windows.
        
           | headhasthoughts wrote:
           | How has it been a huge boon to the GNU ecosystem? Clang is
           | slow, the code generated is not consistently better than GCC
           | for most of the software I personally run benchmarks for, and
           | it's not like GCC has ever been worse for feature support
           | than a Microsoft compiler.
           | 
           | It's better to point out WebKit.
        
             | 95014_refugee wrote:
             | > How has it been a huge boon to the GNU ecosystem?
             | 
             | It would seem that you never used GCC in the pre-llvm era.
             | The GCC project has had a couple of notable periods of
             | stagnation, in each case being "rescued" by the emergence
             | of meaningful competition. First EGCS, and then later llvm.
             | 
             | Clang brought new developers to the space, it disproved the
             | assertion that error messages had to be cryptic and
             | unhelpful, and it has been a peer competitor for an
             | extended period of time now. The two projects compete and
             | cross-pollinate to their mutual benefit.
        
         | mfer wrote:
         | I think this has less to do with "justness" and more to do with
         | cost effectiveness. A majority of people use Windows. That's
         | followed by macOS (or ChromeOS but you can't easily directly
         | port software over there). Then you have GNU/Linux desktop
         | users.
         | 
         | If you're building software you're often going to target your
         | audiences where they are.
         | 
         | In the developer world, there are many desktop Linux users. So,
         | we have more tools available to us related to our jobs. I use
         | desktop Linux and appreciate that.
         | 
         | But, most people across industries and in their personal lives
         | are not in the same situation.
        
         | jwells89 wrote:
         | It's too bad that community interest/investment in efforts like
         | GNUStep, Etoile, and Cocotron have been low, because a major
         | yet consistently underestimated component of why macOS has long
         | had a thriving quality indieware scene is the depth, breadth,
         | and quality of its frameworks. Cocoa/AppKit enables solo devs
         | and small teams to punch well beyond their weight and I'm sure
         | those devs would be happy to sell their programs to Linux users
         | too if they could cross-compile.
        
         | WillAdams wrote:
         | Well, for Mac OS X there is GnuStep which has made Cenon
         | possible.
        
         | paulddraper wrote:
         | > I do understand all the nuances
         | 
         | The reasons, in decreasing significance: (1) demand and (2) OS
         | interfaces.
         | 
         | 1. Linux desktop has a small user base; there's simply less
         | interest and value in porting to Linux.
         | 
         | 2. The POSIX interface is basic (well, more basic than
         | Windows); it's easier to emulate/replace/shim Linux interfaces
         | than Windows ones.
        
         | dorfsmay wrote:
         | As another long time Linux user, I've just started to worry how
         | Microssoft is invading my work life:
         | 
         | GitHub, TypeScript, Vscode (when I have to interact with people
         | who cannot think outside an IDE), and I've just started to use
         | Playwright.
        
           | adhamsalama wrote:
           | Same. I exported all my GitHub repos to GitLab, and I'm
           | thinking about using Neovim (not because it's better, but
           | because I hate Microsoft).
           | 
           | Sadly there isn't much I can do about TypeScript and NPM.
           | 
           | Microsoft wants to control everything in our lives.
        
           | wsintra2022 wrote:
           | Typescript and vscode are both good tools so can't really
           | hate on them, there is codium which removes the MS telemetry
           | from vs code.
        
           | pjmlp wrote:
           | The goal of any corporation, some are more successful than
           | others.
        
       | archero wrote:
       | Is it able to run Xcode? I've been trying to do some iOS
       | development on Linux and so far my solution has been to use
       | DockerOSX... but this sounds much more convenient.
        
         | notpushkin wrote:
         | Only the command-line tools. https://docs.darlinghq.org/known-
         | working-software.html
        
           | Animats wrote:
           | Nice, but all those already run on Linux.
        
             | glitchc wrote:
             | Since when?
        
               | Animats wrote:
               | Everything on that list except XCode has a Linux version.
        
               | saurik wrote:
               | So the big thing is that you can use the command line
               | xcbuild and also often need access to the asset bundlers
               | (which are not open source).
        
               | Animats wrote:
               | That's actually useful. I need the asset bundlers so I
               | can build for MacOS without having a Mac. I already build
               | Rust programs for Linux and Windows on Linux.
        
             | realusername wrote:
             | I think it still could be useful to build ios apps and
             | upload them if that's possible in the command line.
        
               | LtWorf wrote:
               | How to get banned from apple store in 1 easy step!
        
               | realusername wrote:
               | I've done enough app uploads to know it's also half
               | broken on a real Mac, so I would not worry about that.
        
         | jbverschoor wrote:
         | Oh wow, it actually works.. That's awesome for a CI runner
        
       | mgaunard wrote:
       | The problem is that it means porting all of Cocoa etc., which is
       | as big if not bigger than Wine porting the win32 api.
        
         | LoganDark wrote:
         | At least Unix and Linux are similar families of operating
         | systems. Porting over Win32 is probably bigger, especially
         | since Windows 11 still has to run binaries from the 90s. macOS
         | cares much less, and you either do dynamic linking or
         | recompile.
        
         | lodovic wrote:
         | If a ChatGPT assisted port can be seen as a cleanroom
         | implementation, this can be done a lot faster than Wine.
        
           | jdmg94 wrote:
           | it is most definitely not cleanroom
        
             | lloeki wrote:
             | Clean room has two steps:
             | 
             | - Team A: reverse engineer and document
             | 
             | - Team B (with no intersection with A): implement from
             | document
             | 
             | Allow me to indulge in a thought experiment:
             | 
             | What if one tells ChatGPT to generate the documentation,
             | then implementation is done from that?
             | 
             | What if Copilot (which has no visibility into the original
             | code) lays out a huge chunk of the implementation from the
             | documentation?
        
             | wtallis wrote:
             | ChatGPT probably wasn't trained on any proprietary Apple
             | source code.
        
         | OnlyMortal wrote:
         | Foundation Kit was "ok" with GNUStep. I'd expect that would be
         | a good place to start.
         | 
         | As for AppKit and now all the other frameworks that have been
         | added, it'll be an uphill struggle.
        
         | userbinator wrote:
         | Win32 has been Win32 since Win95 (if you don't count Win32s).
         | Additions have occurred, but much of the base has remained the
         | same.
         | 
         | In that time, Macs already changed processor architectures
         | several times.
        
       | vinniepukh wrote:
       | Seems like GUI application support is not there yet. In that
       | case, what command-line software for MacOS is actually useful
       | for?
        
         | LoganDark wrote:
         | Xcode build tools. Right now you practically need a macOS
         | machine to compile applications for macOS or iOS.
        
           | IshKebab wrote:
           | For command line apps you can cross-compile from Linux. IIRC
           | it does require building Clang from source, and obtaining a
           | Mac SDK (which is probably against their T&C's) but there are
           | pre-made scripts to do it (there's a good GitHub Actions
           | one).
           | 
           | That said, I only do that for free projects. For commercial
           | stuff I'd just buy a Mac Mini.
        
             | maxloh wrote:
             | Any links?
        
               | roblabla wrote:
               | Here you go: https://github.com/tpoechtrager/osxcross
        
               | IshKebab wrote:
               | https://github.com/mbround18/setup-osxcross
        
             | LoganDark wrote:
             | > For command line apps you can cross-compile from Linux.
             | 
             | You technically can, but this has various issues. The lack
             | of UI frameworks is one. I don't remember the others since
             | I have a real Mac, but it's only an Intel Mac.
        
           | ptspts wrote:
           | On a Linux host, use pts-osxcross
           | (https://github.com/pts/pts-osxcross) to target macOS, it
           | contains Clang and other build tools precompiled for Linux
           | amd64.
        
         | fuzzy2 wrote:
         | Last I tried Darling, my goal was to make a proprietary printer
         | driver run on Linux. It was available for Windows and macOS
         | (CUPS). So that's one use case.
        
           | notRobot wrote:
           | Did it work?
        
             | fuzzy2 wrote:
             | No, unfortunately I could not get Darling to compile back
             | then and gave up. (I don't have that printer anymore
             | either.)
        
           | hiatus wrote:
           | Why this over Wine with the Windows executable?
        
             | fuzzy2 wrote:
             | The Windows driver wouldn't work with CUPS. Or is there
             | something like ndiswrapper for printer drivers?
        
           | j45 wrote:
           | Depending on your printer
           | 
           | You may be able to print directly to port 9100 of the printer
           | using netcat
        
         | fevangelou wrote:
         | Spot on ;)
        
         | whalesalad wrote:
         | Honestly my feelings exactly. Any cli software that's available
         | for Mac is also available for any other Unix. Seems entirely
         | pointless to me.
        
       | AzzieElbab wrote:
       | This is awesome. Now, what mac soft do I want to run on Linux? I
       | am neither a gamer nor a designer
        
         | gumballindie wrote:
         | Dont worry, gaming on mac is not a thing so that's out of the
         | question anyway - apple products are too low spec for it.
         | 
         | There is some gui software that would be nice to run on linux,
         | but none mase by apple.
        
           | input_sh wrote:
           | There's been some recent big budget games compiled for Apple
           | Silicon; Lies of P and Baldur's Gate 3 come to mind. Of
           | course, that's just a tiny fraction of big budget games and I
           | haven't actually played any of them to know how good the
           | experience is.
        
             | a_vanderbilt wrote:
             | It's nice when it works, but papercuts still degrade the
             | experience. The M-series chips are really impressive when
             | they get a chance to stretch their legs. It feels like
             | we're still in the chicken-and-egg phase though. I don't
             | foresee that changing unless Apple dumps a ton of money to
             | incentivize publishers to port to Mac, or they do what
             | Valve did and make their own equivalent of Proton - aimed
             | at developers. The licensing on GPTK kinda kills that
             | though.
        
             | yjftsjthsd-h wrote:
             | I would natively expect those to mostly have Windows
             | versions that work with WINE already.
             | 
             | Edit: Oh, it might be better if you want an ARM native
             | binary.
        
             | dgacmu wrote:
             | I've been playing BG3 on an m1 Mac mini and it's
             | surprisingly good. I haven't bothered loading it on my big-
             | GPU gaming PC to compare, but that alone says something.
             | 
             | (I'm in no way a serious gamer, so there may be plenty of
             | things I overlook)
        
         | idonotknowwhy wrote:
         | Safari for testing
        
           | yjftsjthsd-h wrote:
           | The real thing is better, but you can probably get most of
           | the way with any WebKit browser native to Linux.
        
         | asow92 wrote:
         | xcodebuild CLI to compile iOS apps without a Mac. Seems
         | possible in theory, although there's an ongoing issue some are
         | seeing apparently:
         | https://github.com/darlinghq/darling/issues/488
        
         | mseidl wrote:
         | I'm a 30 year linux veteran and windows free for over 22. I di
         | d have a windows vm for some time because I have some music
         | stuff that doesn't work with linux, like a nord keyboard and
         | some guitar stuff.
         | 
         | But i burnt the vm with fire when I found
         | https://github.com/foxlet/macOS-Simple-KVM
        
           | jzombie wrote:
           | Doubt it will continue to work once Apple completely stops
           | supporting Intel.
        
           | ptspts wrote:
           | It didn't work for me for the macOS version I tried (not the
           | latest one). Probably because the installer is not available
           | from Applr's servers anymore.
        
       | xyst wrote:
       | Apple would probably send their army of lawyers after GH if you
       | were able to run Final Cut Pro without using Apple hardware or
       | macOS
        
         | lisper wrote:
         | Actually I think they would send an army of recruiters.
        
           | 95014_refugee wrote:
           | This ^
        
       | iAkashPaul wrote:
       | Would be great to get Maccy & Rectangle working on Ubuntu!
        
       | smasher164 wrote:
       | I know this only works for cli tools right now, but I'd love to
       | be able to run iMessage and Notes on linux.
        
         | cplusplusfellow wrote:
         | From your lips to God's ears with iMessage.
        
         | rubymamis wrote:
         | Check out my note-taking app on Flathub:
         | https://flathub.org/apps/io.github.nuttyartist.notes
        
         | acheam wrote:
         | Being able to run iMessage with this would be enough to let me
         | (and I'm sure others) finally ditch my iPhone
        
         | kennydude wrote:
         | Very very unlikely - as far as i know iMessage requires a Mac
         | or iPhone serial number to authenticate :(
        
         | __jonas wrote:
         | I thought notes was just a client that syncs via IMAP so you
         | would be able to use any notes app that supports IMAP sync?
         | 
         | Or has this changed?
        
       | petabytes wrote:
       | I've been using this the past few weeks to try and cross compile
       | my software. Clang works, but a lot of the core libraries are
       | missing. pkgbuild for instance won't work. And even native Cocoa
       | apps I've tried won't work. That being said, this has a ton of
       | potential. I really wish the devs had more time to work on it.
        
         | robterrell wrote:
         | Cocotron used to have pretty good AppKit API coverage:
         | 
         | https://www.cocotron.org
         | 
         | I was able to get a ported app running with it at one point.
         | And I think Microsoft took a pass at it more recently:
         | https://github.com/Microsoft/WinObjC
         | 
         | But it appears Darling uses Cocotron so maybe you've already
         | seen how well it works for you.
        
       | bomewish wrote:
       | Wonder if it does mdsearch/mdutil which is the macOS killer
       | indexing process...?
        
       | da-x wrote:
       | With some smart dynamic binary translation it would be able to
       | run Arm64 OSX binaries. Just 5 times slower.
        
       | rspoerri wrote:
       | Is it only me or is that background color of the FAQ with the
       | black font totally unreadable?
        
       | ncr100 wrote:
       | > We use The Cocotron as a basis for our Cocoa implementation,
       | along with the Apportable Foundation and various bits of GNUstep.
       | 
       | My heart swells, I got to work at Apportable - super fond
       | memories.
       | 
       | .. was a YCombinator 2011 thing
       | https://www.ycombinator.com/companies/apportable
        
       | apatheticonion wrote:
       | Would be nice to have support for fancy terminals like Warp or
       | iTerm2 in Linux
        
       | dang wrote:
       | Related:
       | 
       |  _Darling Progress Report Q2 2023_ -
       | https://news.ycombinator.com/item?id=37220023 - Aug 2023 (15
       | comments)
       | 
       |  _Darling: The macOS virtual emulation layer for Linux_ -
       | https://news.ycombinator.com/item?id=33157857 - Oct 2022 (1
       | comment)
       | 
       |  _Darling - Run Mac apps on Linux_ -
       | https://news.ycombinator.com/item?id=29813679 - Jan 2022 (200
       | comments)
       | 
       |  _Darling: macOS Translation Layer for Linux_ -
       | https://news.ycombinator.com/item?id=24683669 - Oct 2020 (199
       | comments)
       | 
       |  _Darling - Run macOS software on Linux_ -
       | https://news.ycombinator.com/item?id=22700365 - March 2020 (128
       | comments)
       | 
       |  _Darling - macOS Translation Layer for Linux_ -
       | https://news.ycombinator.com/item?id=19772322 - April 2019 (174
       | comments)
       | 
       |  _Darwin /macOS emulation layer for Linux_ -
       | https://news.ycombinator.com/item?id=17718906 - Aug 2018 (7
       | comments)
       | 
       |  _The Mach-O Transition: Darling in the Past 5 Years_ -
       | https://news.ycombinator.com/item?id=13581234 - Feb 2017 (1
       | comment)
       | 
       |  _Darling - MacOS translation layer for Linux_ -
       | https://news.ycombinator.com/item?id=12854895 - Nov 2016 (265
       | comments)
        
       ___________________________________________________________________
       (page generated 2023-11-26 23:00 UTC)