Hacker News new | ask | show | jobs
by lifty 37 days ago
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?
7 comments

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++:

https://philippegroarke.com/posts/2018/c++_ui_solutions/

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.

Tried to visit the site, seems down? It's http://hyphen.space/ right?
Hypen [sic]. Not the punctuation :)

https://hypen.space

Thanks, I will keep an eye on this as well. Wish you success!
Thank you so much! If you ever have any feedback or wishes for the Go side, feel free to reach out!
Hey this looks pretty good.
I like Flutter, it's actually not a webview unlike most other frameworks and likely the most mature out of them. I also am keeping an eye on Rust GUI frameworks, Dioxus Native in particular as they're making their own renderer.
The last one I did was using Fyne in Go, which is quite cross platform but its software drawn not native. Its targeting phones as well so its cross compatibility is very good but at the cost of giving you the full complexity of desktop applications, it does not have a highly capable table view for example. Since its written in Go this is what you will develop in.

Otherwise I think its QT and GTK on C/C++ as the other option across the desktop operating systems, neither is native on anything but Linux but they also look OK but I think a lot of people would rather avoid C nowadays for application development.

I've not used it myself, but I've heard good things about Wails.

https://wails.io/

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.
if typography is critical for you, nothing has better support for it than the web platform
The web platform, which just recently gained tolerable text wrap?

https://webkit.org/blog/16547/better-typography-with-text-wr...

Only reasonable way is shared core with thin UI layer on top. For Rust there is Crux, don’t know for other languages. Everything else is just compromise, like all Flutter apps I know on iOS are just atrocious.
I like this approach, it's what I had in mind, but Crux doesn't seem to support desktop targets. I know on MacOS you can get nice looking apps with their native toolkit, on Linux you have GTK4 which can be decent looking, but not amazing, and on Windows, I truly don't know. Native apps on Windows look crap to me (without even mentioning the advanced fragmentation in UI toolkits in Windows). Maybe someone has some good examples for Windows and Linux, using native SDKs.
> Native apps on Windows look crap to me (without even mentioning the advanced fragmentation in UI toolkits in Windows).

WinUI 3 is pretty decent. Have a look at first-party programs like PowerToys[1], or Windows Terminal[2].

[1]: https://github.com/microsoft/PowerToys

[2]: https://github.com/microsoft/terminal

> Crux doesn't seem to support desktop targets

Only partially true: macOS is supported, and one can fall back to the web. But you're right in that native Windows and Linux are still missing.

> Linux

Problem with Linux of course is that it's almost as fragmented as Windows, with Qt and GTK being the main toolkits, but a dozen more if you ask the wrong people :D I personally don't like GTK, to me it (well, mainly Gnome) looks and feels like trying to copy macOS without understanding what makes it great, but Qt is a toolkit I can get behind…