17 ms·
Darling – Run Mac apps on Linux
- dvirsky 5y agoLooks 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 5y agoGUI 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.
- ivolimmen 5y ago> 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. Then it's not useful as the only thing interesting on macOs are the GUI applications. All the tools I used on macOs for the command line where already available on Linux.
- seanw444 5y agoAs blunt as that is, I have to say I agree and thought the same thing reading through their page. I'm sure it's been quite a feat to get this far, but until GUI is supported well, I can't think of a single thing I'd ever personally use it for.
- olyjohn 5y agoYou gotta start somewhere.
- pxmpxm 5y agoSounds like an inverse of the homebrew project...
- deleted 5y ago[deleted]
- dvirsky 5y agoWhat are some command line tools that aren't available natively on Linux? I'm not trying to dismiss or be negative, just really curious.
- kristofferR 5y ago"xcrun safari-web-extension-converter" is one, for example.
- mastazi 5y agoElsewhere in this thread, iOS CI/tests have been mentioned.
- waffle_maniac 5y agoHow about GPU stuff? OpenGL?
- aasasd 5y ago> GUI will come eventually You mean like GNUStep?
- dheera 5y ago> 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
- waynecochran 5y agoI assume this is not command line only? If so, you really need some screenshots.
- max-ibel 5y agoI suggest actually reading the page since it has the answer to your question. TL;DR: GUI almost working. I assume screenshots will be added when it is.
- tombert 5y agoNot to in any way put down the developers on this, because I realize this is a hard problem, but it's been "almost working" for roughly five years. I don't think we should hold our breath on it, sadly.
- em500 5y agoAlso, the fact that last update of the blog/progress report linked from the main page dates from 2019Q2 does not give much confidence.
- tombert 5y agoThe Github is still getting updates, at least as of November. I think part of the problem is that most software that you would want to run on Linux from MacOS are also on Windows, and Wine/Proton already exists. As a result, I think people don't really feel the urge to contribute to Darling when they could just contribute to Wine.
- waynecochran 5y agoAlmost tells me they must have some screenshots of some GUI app working. Otherwise I almost have a million dollars to donate.
- saagarjha 5y ago
- stuaxo 5y agoThere'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 5y agoIf 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.
- gh123man 5y agoHas 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.
- yjftsjthsd-h 5y agoFor 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.
- SmileyKeith 5y agoThis does generally work, but it requires a lot of manual effort to setup the environment correctly with Xcode's SDKs to satisfy the compiler / linker.
- saagarjha 5y agoPlus, I’ve found that most iOS codebases, tend to rely on parts of Foundation and the Objective-C runtime that are not implemented on Linux, even if the code doesn’t touch UIKit at all.
- SmileyKeith 5y agoIn this case I meant taking an approach similar to this one for bazel[0] that is not limited to only code that works on Linux. It would only allow you to build on Linux and would require any testing / running would still happen on macOS, but that might still be worth it in some cases. Theoretically you could deploy your iOS app that way as well. [0]: https://github.com/apple-cross-toolchain/rules_applecross https://github.com/apple-cross-toolchain/rules_applecross
- tomrod 5y agoExcited to see this. Hopefully this resolves the application portability issue for Linux (e.g. Microsoft Office native apps)
- microtonal 5y agoIf you want to run apps like Microsoft Office, Wine is probably a far better bet. I'd be surprised if Darling runs complex Cocoa apps anytime soon.
- xattt 5y agoThere is no possible way to run current versions of Office 365 on Linux at present.
- marcodiego 5y agoI run it with Wine. It is slow and buggy but it works.
- OnlyMortal 5y agoI’d guess doing the C APIs for CoreGraphics and using those under AppKit would be a way. CoreFoundation already (partly) exists for FoundationKit support though I’d probably grab the GNUStep code for that. Any old Carbon APIs might be a hassle. Compositing is where it’d get tricky even with Ghostscript. It’d be slow without hardware support. Impressed they can load dyld though. That’s a tricky thing to do.
- zrm 5y ago> If you want to run apps like Microsoft Office, Wine is probably a far better bet. I'd be surprised if Darling runs complex Cocoa apps anytime soon. The advantage of Wine is that it's more mature. The disadvantage is that Windows is possibly the least Unix-like operating system in popular use and the number of ugly hacks they have to use to make Linux do what Windows does will never cease to be a source of friction and heisenbugs. Whereas macOS is a Unix, so Darling doesn't have to imitate all the eccentric behavior of the Windows kernel, it can just implement the API.
- bifrost 5y agoThis is cool, would love to be able to use this on FreeBSD as well.
- shiftoutbox 5y ago[dead]
- mkdirp 5y agoLots of questions around GUI apps. As someone pointed out, GUI apps have been "almost" working for years. Darling looks great but it hasn't gotten near as much love as Wine has gotten. I've been keeping an eye on it, and will continue to keep an eye it, and I've noticed the development is very slow. At the rate it's going, it'll be years before it'll be a viable solution like Wine is. I hope visibility for it will increase so that the current devs get some more help on this. I'd still like to give thanks to the devs as this is a very ambitious project. I'm sure people used to say "it'll be years before it'll be a viable solution" when Wine was in its infancy. Having Linux run iOS, macOS, Android, and Windows applications running would be nothing less than mind-boggling, and would finally get people to stop yelling that nothing runs on Linux.
- freedomben 5y ago> Having Linux run iOS, macOS, Android, and Windows applications running would be nothing less than mind-boggling, and would finally get people to stop yelling that nothing runs on Linux Nothing will stop those people from yelling that, because it hasn't been true in a very long time and that doesn't stop them. These are the same people who say they don't want to run Linux because they don't want to compile their sound card drivers. They are already way outside of rational territory and deep into religious territory. In their minds Linux hasn't changed a bit since 1999, even though if you were to compare mac os from that time period against modern linux, they would become enraged at the unfairness and injustice.
- Osiris 5y agoTo get my bluetooth adapter to work I had to find a third-party driver, compile it, and manually setup DKMS so it'll update whenever a new kernel gets installed. That's a much more complicated process that either macOS or Windows.
- jorvi 5y agoFor macOS to use a USB <> Ethernet adapter I had to hunt down some obscure driver, and after a certain macOS update it kept putting it in a folder on the desktop after each update despite it working if I just reinstalled it. I absolutely used to love macOS and thought that they must have the cleanest nicest code in the world because they have such a well-developed UI+UX, but in the end, the core code below it has the same wrinkles as any software project. They’re just paved over. Plus, Apple loves to let stuff fail silently.
- marcodiego 5y agoConsidering 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 5y ago> 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 5y agoThere is a common heritage. On the other hand, the low-level libraries also depend a lot on Mach features like message passing.
- jedisct1 5y agoZig has out of the box support for Darling, in order to directly run cross-compiled macOS apps on Linux.
- freedomben 5y agoJust 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!
- mikkelam 5y agoSee also: https://news.ycombinator.com/item?id=12854895 https://news.ycombinator.com/item?id=12854895 [nov, 2016] https://news.ycombinator.com/item?id=19772322 https://news.ycombinator.com/item?id=19772322 [apr, 2019] https://news.ycombinator.com/item?id=22700365 https://news.ycombinator.com/item?id=22700365 [mar, 2020] https://news.ycombinator.com/item?id=24683669 https://news.ycombinator.com/item?id=24683669 [oct, 2020]
- awill 5y agoisn't packaging/selling going to be a problem here? Some of the apps I rely on (on my MBP) are only in the Mac AppStore.
- mastazi 5y agoThis project needs more contributions! I hope being on the HN home page will help
- saagarjha 5y agoI have some bad news for you…
- OnlyMortal 5y agoInteresting. 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!
- duskwuff 5y ago> I expect the display postscript (now PDF)... This is a commonly repeated myth. The Quartz graphics framework does not use PDF internally. Its rendering model is roughly based on PDF, but not much more so than any other vector graphics format, like SVG or Cairo.
- monocasa 5y agoDoes 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 5y agoYep, 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.
- jesboat 5y agoThe module is amazing and actually kinda terrifying: it grafts in a decent bit of xnu, rather than re-implementing all xnu's features from scratch. This is made a bit more sane because Mach was designed to be extremely portable and has a good abstraction layer for manipulating very low-level stuff like page tables and contexts. But it's still kinda incredible. Part of me wonders if it wouldn't have been easier to graft Linux into xnu instead. https://github.com/darlinghq/darling-newlkm https://github.com/darlinghq/darling-newlkm
- VTimofeenko 5y agoAsking 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?
- andjd 5y agoRelated unrelated comment. Is there any effort to make Darwin itself user friendly? Everything I've heard anecdotally is that Darwin is a world of hurt unless you really, really know what you're doing. It seems like that might be a slightly easier path towards having an open-source OS that can run mac apps than building a whole compatibility layer over Linux.
- aflag 5y agoThat sounds more difficult, actually. Because then you need to be able to run everything. Whereas, with linux, you can leverage most of linux's library and only use darling for the couple apps that you need that only run on Mac OS.
- hitpointdrew 5y agoOh man, if we can have iTerm2 on Linux I will be pumped.
- jldugger 5y agoAre you familiar with Terminator? https://terminator-gtk3.readthedocs.io/en/latest/ https://terminator-gtk3.readthedocs.io/en/latest/
- hitpointdrew 5y agoI don’t see a password manager listed in the features, which is about 70% of what I think makes iTerm2 so useful.
- jldugger 5y agoTIL. Never used that!
- hitpointdrew 5y agooption + command +f Pop-up box comes up, here you can have as many credentials as you need, it saves them, just double click one and it will enter it in your terminal window. This an absolute life changing feature for me. I manage a ton of servers, and yeah we use SSO to ssh into them, but that is just ssh access. Once you are on a server they maybe several passwords and or accounts you need to login to or accesses (like postgres, mongodb, redis, etc.). Of course we have seperate passwords for each environment, so having this feature is pretty much a must for me now. Any terminal software that doesn't have a feature like this is a no-go for me (and so far iTerm2 is the only one I have found that has this feature, I have looked high and low for something similar native in Linux but have only come up with bupkis). The other features I like about iTerm2 are pretty standard in at least a dozen or so other terminal emulators (tabs, split windows, etc.). Password management is THE feature that is painfully missing from Terminator, Tilix, etc.
- 5y ago
- miller_joe 5y agoCan 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.
- teilo 5y agoGood 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 5y agoI 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?
- teilo 5y agoIt is, but perhaps I'm not understanding how it is currently implemented. I thought there was a system framework it relied upon, and if so, that framework would need to be implemented in Darling. Perhaps the framework is embedded in every .app package? There's a similar issue with the Swift runtime. I believe Apple's goal is to make it a system framework, at which point it would also need to be implemented in Darling.
- spitfire 5y agoHopefully they extend this back to NeXTStep interoperability. I would love to be able to run Quantrix and FrameMaker.
- Crown_jewel 5y ago
- DyslexicAtheist 5y agostupid 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.
- linkandzelda 5y agoI 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!
- u-rate 5y agoAny creative tool (audio, video, picture), that doesn’t randomly crash after 30 minutes
- vhhn 5y ago> that doesn’t randomly crash after 30 minutes that rules out any Adobe product :)
- gurkendoktor 5y agoFor 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).
- grouphugs 5y ago
- rocqua 5y agoI would love if I could use this to run Photoshop. It is the only thing keeping me from switching to linux-only.
- qalmakka 5y agoThe 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.
- teh_klev 5y ago> 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 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?