Live data from Hacker News

Ask HN: How do you create a cross-platform GUI without using Electron?

news.ycombinator.com

51–60 of 112 posts

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#51

I'd highly suggest using Dart and Flutter. I've probably written GUI apps in C, Java, Ruby, Objective-C, Swift, JavaScript, and probably a couple I forgot about. Dart+Flutter come the closest to being "good" and correct. There's some missing documentation for Desktop development with regards to Flutter + Dart but nothing is totally intractable if you're willing to read through issues. My only caveat is that Google is…

Qt has been mention a lot, it's confusing all the license deal. I kind of understand that is free of use if it's not embedded.

But flutter looks like a good option.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#52
post #7

There are several options, each with their own pros and cons. Qt [1] The main codebase is C++, but bindings are available for Python and several other languages. I have developed and shipped multiple cross-platorm applications using Qt, using both C++ and Python. Documentation and source code examples are readily available. JUCE [2] Another C++ framework, with Python bindings. The focus is on music and audio apps, bu…

From https://juce.com/get-juce "JUCE is dual licenced under both the JUCE licence and the GPLv3."

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#53
post #34

Earlier quoted context omitted.

Have you tried Free Pascal with Lazarus[1]? How does it stack up compared to Delphi? [1] https://www.lazarus-ide.org/

I like Lazarus and I think it's great and important that it exists, especially with Embarcadero refusing to recognise and take seriously the needs of a developer community outside of Fortune 500 orgs (I'm slightly exaggerating but not much). Lazarus is Free Software, which is awesome, and its feature set is also mature and impressive (I wouldn't have thought that the project also has a 20+ year history already). I do…

> take seriously the needs of a developer community outside of Fortune 500 orgs

Yeah no kidding. Last year I tried to download the trial of their paid C++ IDE. The licensing tool wouldn't work, and support never returned my emails. People complained in the official forum, no company response their either. I took that to mean "We see you as such a low-value potential customer, we won't lift a finger to get our own demo to work for you".

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#54

https://tauri.studio/ - I haven’t used it myself but looks pretty interesting. They say they use existing browser engine shipped with OS and desktop integration layer written in Rust. The claim is that you get an application size under 1MB

Used this for a small linux GUI proof-of-concept.

I really liked it. It was awesome to use something I'm familiar with (Next.js) and have it drive the UI. Resulting application was indeed about 1MB after all said and done.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#55

In Solvespace we use native GUI on Windows, MacOS, and Linux (GTK). This is probably not what you want to do, as we don't use any GUI widgets - only popup dialogs and menus. Everything in the app itself is rendered using OpenGL. Even our "text window" is drawn using OpenGL and GNU unifont (this is something that really needs to change BTW). The platform abstraction code is here: https://github.com/solvespace/solvespa…

> our "text window" is drawn using OpenGL and GNU unifont (this is something that really needs to change BTW)

What would you change it to? I've implemented a GUI toolkit from scratch a couple times, and text editing was the hardest part by far.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#56
post #48

Delphi, believe it or not. Might even be the most mature and feature-rich of any of the technologies and frameworks mentioned here. RAD Studio 11 just got released and allows native development for "all platforms" from a single codebase and GUI at the click of a button. [0] I have ranted about and harshly criticised Embarcadero's misguided product policies as much as the next guy but that doesn't change the fact that…

Does the community edition work on linux, or compile to linux? The page says: > Delphi Community Edition is a full featured IDE for building iOS, Android, Windows and macOS apps ... But looking at the feature matrix for the full product it says: > deploy to the platforms you need to support and with RAD Studio that includes Windows, macOS, iOS, Android and Linux!

https://www.embarcadero.com/products/delphi/product-editions

> Build Linux client / server applications (includes FMX GUI for Linux) The RAD Studio Linux Compiler enables compiling applications to popular Linux platforms. FireMonkey GUI for Linux extends the FireMonkey UI framework to provide full Linux GUI support.

Only offered on Enterprise ($4K) / Architect ($6K) editions.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#58
post #49

One word: Lazarus. Cross platform done right (native code, no intepreter, no VM). Both IDE and generated code run native just about everywhere, from small ARM boards to virtual machines, and of course x86. As fast as C, decent sized executables, lots of built in or available libraries and components to do a lot of things, from managing databases to low level access to hardware, graphics, sound, etc. And of course it'…

What's the Lazarus experience like for cross-compiling to other platforms? E.G. how hard is it to build a working result for Windows, OSX and Linux (maybe BSD) from Linux or BSD?

I don't recall having to cross compile, since the IDE itself runs on so many platforms. For not too complex projects, or not resource constrained hardware, importing the project and compiling it directly on the target might be the quickest solution.

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#59
post #7

There are several options, each with their own pros and cons. Qt [1] The main codebase is C++, but bindings are available for Python and several other languages. I have developed and shipped multiple cross-platorm applications using Qt, using both C++ and Python. Documentation and source code examples are readily available. JUCE [2] Another C++ framework, with Python bindings. The focus is on music and audio apps, bu…

Funny, I actually use JUCE for audio and yet it never crossed my mind to use it as a general purpose cross platform UI. Good call!

Re: Ask HN: How do you create a cross-platform GUI without using Electron?

#60

Delphi, believe it or not. Might even be the most mature and feature-rich of any of the technologies and frameworks mentioned here. RAD Studio 11 just got released and allows native development for "all platforms" from a single codebase and GUI at the click of a button. [0] I have ranted about and harshly criticised Embarcadero's misguided product policies as much as the next guy but that doesn't change the fact that…

> The free Delphi community edition

For a moment I was tempted to look into Delphi again, as I have spend many years in that environment. However, I see now its free until you hit USD 5.000 revenue per year. Not 0 USD, not USD 50.000, but only USD 5.000. Yes, that is the Embercadero that I knew. Probably this 'free' edition is canceled next year. Would not be the first time...

Edit: yes, still only runs on Windows

Post reply on HN