TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

macOS Apps in Rust

184 pointsby debdutabout 2 years ago

9 comments

apatheticonionabout 2 years ago
Pretty cool project, seems like it&#x27;s becoming more realistic to write cross platform native desktop applications with OS-specific GUIs in Rust.<p>It&#x27;s not too far from the write-once-run-everywhere philosophy of React native, Electron and similar. One could write their UI state and application logic once while maintaining 3 entry points using the various platform GUI bindings (gtk-rs, cacao, win32?) to represent the UI state.<p>This has the advantage of a project feeling natural to the platform while still allowing for code reuse between platforms - though you would still need to rewrite widgets&#x2F;components for each platform independently.<p>Something that isn&#x27;t talked about much in the GUI world (outside of mobile development) is how essential multi-threading is to a great application experience. After all, you can&#x27;t horizontally scale a client device so it&#x27;s important that an application is able to maximize its use of the available hardware. Rust&#x27;s borrow checker&#x2F;ownership model eliminates dangerous multi-threaded code which makes it practical to write highly efficient GUI applications.<p>Could be good for projects like cross-platform terminal emulators or code editors.
评论 #35935692 未加载
评论 #35936037 未加载
评论 #35935394 未加载
kitsunesobaabout 2 years ago
Interesting to see that AppKit is fully supported before UIKit, usually it&#x27;s the reverse (if AppKit is supported at all). I suppose it kind of makes sense… the case for sharing a Rust core across platforms is stronger on macOS, because on iOS the optimizations you&#x27;re trading away (such as the native network stack scheduling requests from apps to fire while the antenna is already awake) have a bigger impact on iDevices.<p>Tangentially related, I&#x27;d to dabble in Rust at some point but the syntax and memory management leave me trepidatious, and I&#x27;m not sure that it&#x27;d be the tool I reach for when developing apps with UIs… from a distance it feels better suited for CLI tools, back ends, and the nuts&#x27;n&#x27;bolts parts under the hood of UI apps. In comparison it makes some tradeoffs but I really enjoy writing UI apps in Swift (albeit in UIKit&#x2F;AppKit — SwiftUI needs more time in the oven).
评论 #35935706 未加载
评论 #35935482 未加载
评论 #35940546 未加载
kennywinkerabout 2 years ago
&gt; I would be surprised if we didn&#x27;t have another ~5+ years of support<p>Five years would shock me. I’d say more like ten. It’s gonna take a huge concerted effort to get rid of objc in macos, and idk if it’s worth it
评论 #35935420 未加载
评论 #35940560 未加载
jashepheabout 2 years ago
A tangent: does anyone have recommendations for a library for easy Swift-Rust interop? This is a cool tool, but I’d much rather make a GUI natively with e.g. SwiftUI and then call out to Rust for business logic. The previous times I’ve looked into this, both languages had to communicate through a C intermediate, and handling more complex types became a chore…
评论 #35969716 未加载
评论 #35937642 未加载
评论 #35937502 未加载
todd8about 2 years ago
This is off topic, but thinking about portable desktop apps, why didn’t JavaFx become more popular? What is JetBrains using for its sophisticated GUIs? Is it just Swing? It would be great if Rust could be used to write portable high quality desktop apps.
评论 #36010744 未加载
tempodoxabout 2 years ago
If you use the Cocoa API with ObjC or Swift, you get Automatic Reference Counting (ARC), generated by the compiler. I guess with this you&#x27;d have to retain &#x2F; release your objects manually again?
评论 #35936372 未加载
评论 #35935915 未加载
评论 #35940575 未加载
meatjuiceabout 2 years ago
Is it a backend library for Slint?
评论 #35936217 未加载
ushakovabout 2 years ago
1000 GitHub stars and not a <i>single</i> screenshot?
评论 #35940585 未加载
评论 #35937825 未加载
brundolfabout 2 years ago
Is... the name a Portlandia reference?
评论 #35935859 未加载
评论 #35935548 未加载
评论 #35935653 未加载
评论 #35940587 未加载