Rust has bad ergonomics. You will see that "attitude" as long as coding exists, or lifetimes are fixed in a way to allow you to omit them in contexts which are not concurrent or are embarrassingly parallelizable.
I would take Zig over Rust any time. It simply fits the way I think much much better.
And since 0.16/0.17 Zig introduced a very nice async/concurrency system that doesn't require function coloring. While async in Rust still feels strange and not well integrated.
Cool, let me know when you have a rational counterargument then, some of us have gotten fed up with Rust (especially at scale) and are very much enjoying Zig (which has no magic, which turns out to be a huge advantage at scale)
"No borrow checker" id not a reason to switch to Zig, unless you have a reason that borrow checker is limiting you from developing, hence the "I don't like this attitude". Just give the reason, not the "solution"
Not to mention we're nitpicking over something that an LLM wrote.
Slightly off topic, but what is the best way to build a cross platform GUI app these days, but something with good graphics, typography, etc. I mean a beautiful app. I would prefer to have a shared core in Go, and then something around it to give me the GUI. I know on MacOS it is straightforward to build something beautifully looking with their native Swift toolkit, but not sure on Linux and Windows. Is it better to just use a web view, or perhaps Flutter?
I keep coming back to this and not finding / choosing a solution. It sadly feels like people who are doing this are just going with Electron now. I'm mostly coding in Go now, so I seem to be looking for a similar solution to you.
This page has a lot of cross-platform GUI toolkits, but it focuses on C++:
I've been drawn to wxWidgets (actual native controls on each platform) or JUCE (most of the cross-platform commercial Windows/Mac/Linux audio effects I've bought are made in JUCE). But I've not had a chance to give either a proper try.
Years ago I used to all my cross-platform work with Xojo, a kind of cross-platform Visual Basic. That actually worked well for me, but then you're writing code in the Xojo Basic language, and it had some odd file formats for projects (not just raw text source files like C++ / Go would give me). Once LLMs hit I felt I probably needed to move on from Xojo to something less proprietary: https://www.xojo.com/
I'm actually working on that - it's called Hypen - (hypen.space).
You can build your core in Go or any other supported language, and write the UI in the Hypen DSL.
While desktop is still in the works and should be out in the next week or two, currently the alpha supports Native iOS, Android, Web and Web Canvas, and just like mobile, the Desktop will be _real_ native.
I have my eyes on that, looking forward to V3, maybe they manage to ship mobile support as well. That would be fantastic. For anyone that doesn't know, it's still a browser based stack.
Im not sure if people are getting the biggest problem in electron desktop apps.
Its RAM usage not the disk!!
Why are they all making the same thing in different ways?! I have never worked on an electron app where the executable size was an impediment to the business. Its always the RAM/CPU usage. If we are going to work on the same webviews like electron and others, how will this make any difference?
Easy: the problem with memory is not the WebView nor is it displaying HTML using that WebView. The problem is the layers of layers of JavaScript (frameworks) running in that WebView when using Electron or the like.
I am working on something similar, HTMXNative as part of a bigger idea called interscri.pt that can use either WebView or native for rendering and the difference in memory consumption is somewhere between minimal (or even undetectable) and modest.
From a baseline that's also modest by current (native) standards.
Still, using system's native GUI should be more performant and use less memory.
I would rather see existing Zig GUI libraries using system's GUI primitives improving. With LLM GUI stuff should be simple enough and we don't need to rely on people web expertise to build desktop apps.
Unfortunately, all the native "system" GUI frameworks are all terrible in their own unique ways.
Unless you mean drawing the gui directly to a graphics surface, which often results in even poor accessibility and system integration unless the developer cares a lot about that and puts a lot of effort into it.
Qt is used to develop arguably the best desktop environment on the market - KDE Plasma - as well as a miriad of serious software artifacts. It's not exactly native to MacOS and Windows, but advantages overweight the downsides.
so basically a vibe coded Tauri in zig? I don't like calling webview dependent applications "native desktop apps".
Native desktop apps means using the OS primitives and directives to draw the UI imo; WinForms, SwiftUI, and their ilk.
reply