Hacker News new | ask | show | jobs
by ausjke 3665 days ago
Electron might not be "fast" enough for many serious GUI applications? That been said, I also am struggling with finding a non-Java cross-platform GUI dev platform. The selection pool boils down to between QT and Electron indeed these days.
4 comments

You are correct. The only serious frameworks nowadays are Qt or Electron if you're targeting the cross-platform desktop. There's also wxwidgets, although its python 3 bindings are still being built.

Personally, I'm keeping my eye open on libui (https://github.com/andlabs/libui/) as it is already possible to do some basic things with it. However, it is pretty much in alpha state and I'm slowly writing the Python bindings for it at https://github.com/joaoventura/pylibui/. The thing that I like in the libui is that it is a thin wrapper around platform specific frameworks. Therefore, the library is very small (some 340 KB) and it's as native as the underlying platform calls are..

Regarding Electron, I am writing an application on it, but it is too god damn heavy in terms of memory, disk space and boot time, and web front-end development is absolute chaos these days. Although I'm currently writing my app on it, it is mostly an MVP as I want to make pylibui/libui usable enough to switch to a pure desktop cross-platform library asap..

"Regarding Electron, I am writing an application on it, but it is too god damn heavy in terms of memory, disk space and boot time,"

Try Sciter HTML/CSS engine then (http://sciter.com). It is a monolitic DLL (4-8 Mb) without external dependencies. Works on Win/Lin/OSX and even on Raspberry Pi 2 - http://sciter.com/sciter-on-raspberry-pi-2/

Thanks for the suggestion, I didn't knew about this before! So I've tried it, the lib is small (~9MB on OS X), it renders pretty fast and has python bindings which is quite great.

However it lacks in some areas, such as the scrolling which is quite bad, and it does not render the SVG files that I'd need it to render (tiny SVG spec, but lots of defs and rotations). I'm still going to look better into it since I can use Cairo and CairoSVG to convert my SVGs to PNGs, but I still do not know how well it renders some css rules, fonts, etc..

There is also JUCE, but it's more focused on audio application development. https://www.juce.com/
Kivy isn't well know but I use this often : https://kivy.org/
Kivy looks neat, it seems geared towards python-games.
Electron is probably fast enough for my purposes, just I wouldn't call using for an embedded device easy. You need to have x running for it. It doesn't support chromium ozone and KMS yet. Also it has a pretty big footprint. I'm targeting the RPI compute module so I don't have a ton to work with.