Hey there GTK/GNOME folks.
This is about LibUI and, indirectly, GTK. I hope to be able to
convince in particular the GTK devs to consider LibUI as the
idea. Not so much the implementation, but the idea.
If you are more interested in GNOME than GTK then this thread
is probably not hugely interesting for you. And if you already
know LibUI then I am probably not telling you anything new,
either. But others may still learn something new.
So, first, what is LibUI?
It is a GUI, more or less, that attempts to be quite cross-plattform
supportive. Aka write once, run everywhere.
The github repository is at:
I think it was started in 2016 with Go-bindings, but it is
still actively maintained. Unfortunately Pietro does not
have a lot of time so it’s going quite slowly … but anyway,
don’t focus on the activity issue - focus on the IDEA behind
The general idea is to have cross-OS platform support for
GUIs. I am using it only via the ruby-bindings, but it works
fine. I was able to run my widgets that I wrote in ruby-gtk3
on libui too, and it worked on windows. I can even create
.exe files (cheating a bit, via the ocra gem). Yes, this is
nowhere near on the level of simply compiling proper C and
C++ applications, I know that - but it is super-simple really.
I get things done quickly. And I suppose, one day in the
future, I may pick up C/C++ properly and create “real”
applications. But for the time being I am having fun
creating tons of small, specialized widgets over functionality
available in my gems.
The huge benefit is that it works very well on windows.
And this is where it ties indirectly into GTK. Actually,
it uses GTK on linux, but my point here is more that
I failed to compile GTK on windows. This is probably due
to my lack of knowledge, but after I tried to compile it,
I had missing symbols error on the commandline. I gave
up. Perhaps one day I will try again but it’s way too
This is where GTK could learn from libui. Create something
that is small, portable, efficient. It’s an area GTK
neglected a lot.
Libui does not use GTK on windows as far as I know, so
my comparison is not completely fair. But I am comparing
the SIMPLICIY here. On windows, I just installed the
libui gem and ocra … that’s it, sort of! There goes
my new shiny .exe file (ok, cheating a bit too via
the ruby interpreter bundled into it, but again, the
IDEA is what I am referring to).
Wouldn’t it be great if GTK would be super-simple to
get on windows as well?
I am not referring to all of GTK, mind you. LibUI does
not support all of GTK as far as I know. CSS support
is not there as far as I know, to show one example.
But the simplicity … now that is existing.
I’ll continue to use ruby-gtk3 just fine, but I am mostly
limited to linux. I’d love if GTK would become as simple
to use on windows too.
If a single man can do so (in regards to LibUI and windows)
even if it is not using GTK on windows, then I challenge
the notion that the GTK stack is simple. I think it became
too complicated. I’d even suggest radically bundling
together tongs of things - pango, glib, cairo, atk …
and so on. I am aware that this is not easily possible
right now but in the long run it would be so cool if
GTK would be super-simple to build and get running on
windows as well. Personally I failed due to the missing
symbols issue; perhaps I will solve this one day in
the future. But for now I am on a libui-driven rush,
where I’ll port my widgets to libui in addition - probably
using a DSL that abstracts this away, so that I can
more easily replace the GUIs (ruby-tk is an additional
option; tk works for me on windows too but it is soooooo
ugly and the ruby API to ruby-tk is HORRIBLE. The ruby
API to ruby-gtk is much better on the other hand.)