this post was submitted on 28 Nov 2021
18 points (100.0% liked)

Rust Programming

8159 readers
1 users here now

founded 5 years ago
MODERATORS
 

Has anyone here ever tried using Rust's Qt or GTK bindings, or another library, to make a complex GUI beyond a few simple forms or dialog boxes? I keep hearing that the language's architecture makes it really hard to do any sort of advanced GUI development on it, but what's the actual experience like? How would you compare it to say, native Qt or GTK using C++/C respectively, or things like JavaFX or Flutter? Maybe even the .NET Framework or whatever Apple uses for their platform? Would you actually recommend Rust over any of those?

top 7 comments
sorted by: hot top controversial new old
[–] Reaton@lemmy.ml 5 points 3 years ago* (last edited 3 years ago) (1 children)

The only GUI software written in Rust I've seen so far is Fractal but I'm not sure we could say it's a complex GUI tho :/
They are actually working on rewriting the software from scratch with GTK4

We are working on rewriting Fractal from scratch using GTK4 and the matrix-rust-sdk. This effort is called fractal-next.

[–] snoopa@lemmy.ml 6 points 3 years ago (1 children)

Lots of other Gnome apps are written in Rust as well.

[–] Reaton@lemmy.ml 2 points 3 years ago

Oh I didn't know that! :o
Well tbh I don't usually use Gnome apps.

[–] snoopa@lemmy.ml 5 points 3 years ago

Depending on how serious your work is, you might want to consider https://github.com/antoyo/relm . It let's you work with an easier Elm-like abstraction on top of Gtk.

[–] dessalines@lemmy.ml 4 points 3 years ago* (last edited 3 years ago)

I've only played around with some, but my personal favorite was iced. The GUI and QT binding frameworks seemed overly complex for 99% of use cases.

[–] kyleisguilty@lemmy.ml 3 points 3 years ago

haven't done much GUIs on rust but i can say the Qt/GTK experience isn't good, Qt/GTK rely too much on multiple ownership and on rust that's a big no-no (basically, you either have to put everything behind a RefCell or use unsafe everywhere)

thankfully that problem can be avoided by simply writing the library in rust (although that does bring other problems)

[–] newhoa@lemmy.ml 2 points 3 years ago* (last edited 3 years ago)

Czkawka is a rewrite/improved version of FSlint written in rust. It finds duplicate, broken, and excess files. And it can compare images and videos to find similar media. It uses Gtk (and Glade).