15 ms·
AFAIK, for better or worse, this is the only UI crate (other than HTML-like UI using something like Tauri) that provides a full set of widgets/capabilities on R
by nu11ptr 3y ago
AFAIK, for better or worse, this is the only UI crate (other than HTML-like UI using something like Tauri) that provides a full set of widgets/capabilities on Rust. Every other UI lib is incomplete in some way or falls short for anything other than a toy or specialty type app in my experience.
UPDATE: Things I have my eye on as they mature: Slint, egui, and iced. I'm especially watching iced as Pop_os is using it for their DE and likely will add quite a few widgets.
- DoctorOW 3y agoThere are plenty of situations where GTK might be better than Slint, but not so overwhelmingly that I'd call it only for toy apps.
- nu11ptr 3y agoWhile you can create one on your own, any lib that doesn't have a tree widget isn't ready for primetime IMO. Obviously others may have a different opinion. Also, I don't believe there is any way to embed a webview at this point which is often necessary to embed things like charts or other widgets you don't want to create on your own.
- jerf 3y agoGUI toolkits are like MS Word... as the saying goes, everybody only uses 10% but everyone uses a different 10%. This is one of the major things that makes it so hard to have a truly world-class widget set. Making "a" widget set is easy. Making a great one is staggeringly enormous.
- nu11ptr 3y agoI agree - which is why it seems like a better idea to either write bindings to an existing one or use something like Tauri/flutter/etc. It will be VERY hard to both 1) create an adequate UI paradigm in Rust -AND- 2) have a complete widget set large enough to create any business app
- kitsunesoba 3y agoAlso, tableview/datagrid, complete with support for sorting and reordering items and columns. It’s shockingly difficult to find newer UI frameworks with this, even though it’s one of the most important desktop UI widgets for a lot of use cases. Win32, Cocoa, GTK, and Qt Widgets have it though, and that’s part of why those toolkits continue to get used.
- nu11ptr 3y agoSlint recently added a table widget complete with sorting, which was very welcome
- overthrow 3y agoI think egui is complete enough to use in real apps. Layout can be a bit weird, but I haven't found anything that's impossible. I might even prefer it for cross-platform apps since startup time is so slow for GTK on Windows.
- nu11ptr 3y agoThe challenge with egui is the theme. It looks ok, but isn't good enough for a commercial business app for example. Also, I believe it lacks a webview, so if you are in a pinch the only thing you can do is create your own widgets without a way to cheat and embed some web content. I would agree for certain types of apps it may be "good enough" (science, gaming, medical perhaps...anything where the UI is secondary to the 3D viewport)
- galangalalgol 3y agoNative look and feel is vastly overrated imo. Delphi and before it borland builder made for great UIs despite not looking native. To the point that when I came across that widget set, I knew I was in for a good UX. Still many bespoke interfaces, like at a brakes repair or small lumber yard chain use delphi and it works just fine. As for the webview, thats a thing, but if you will have web access, you can target wasm, and make the egui interface embedded in the webpage instead of the other way round. But yeah, I don't see a webview being part of eframe/egui proper anytime soon because it treats wasm as a tier one target. You might see it supported third party the same way the efile crate supports open file dialogs but only for windows or linux builds. Edit: dropping the demo link here for people to poke around. I'm curious what people use that is missing, and what people find unsuited to commercial use. https://www.egui.rs/#Demo https://www.egui.rs/#Demo
- nu11ptr 3y agoI mean no offense to the egui people because they have done amazing work, but it isn't that it isn't native, it is that it doesn't look good enough to ship something with it (other than a science/medical/gaming UI perhaps, but certainly not a business app). Gtk won't look native either on anything but Linux...at all, but at least is very professional looking in its default theme. Obviously what looks "good enough" is highly subjective. UPDATE: True, it is themable, I just wish the default was a little more polished
- dotancohen 3y agoI have not looked, but are there no Qt bindings for rust? Qt is about as complete as they get.
- nu11ptr 3y agoThere are but they are not well maintained in general. Some of the bindings require some additional C++ or other painful ways of interop. I have heard some good things about the qmetaobject crate though.
- ogoffart 3y ago- https://github.com/woboq/qmetaobject-rs https://github.com/woboq/qmetaobject-rs - https://github.com/KDAB/cxx-qt/ https://github.com/KDAB/cxx-qt/
- nicoburns 3y agoI would add the following to your list: - Vizia https://github.com/vizia/vizia https://github.com/vizia/vizia - Freya https://github.com/marc2332/freya https://github.com/marc2332/freya - Xilem https://github.com/linebender/xilem https://github.com/linebender/xilem - Floem https://github.com/lapce/floem https://github.com/lapce/floem
- nu11ptr 3y agoI'm aware of those, but I don't consider those UI crates in the same way as gtk-rs. The best analogy I can come up with is I don't consider react or vue-js UI libraries either, but low level libraries that can be used to build a UI lib. I consider Material UI (which uses react) to be a UI lib, for example. In the same way, AFAIK these crates are much more concerned with inventing the best UI paradigm than they are at having a full set of widgets useful in creating business apps. TLDR; I think of these as low level crates, not high level UI crates. If that changes, they will be added to my watch list.
- nicoburns 3y agoIMO they're just less mature than the one's you've listed. I'd expect them to get all the bells and whistles in due course (assuming that the projects suceed in general).
- jcelerier 3y agoDo any of them have something remotely close to Gtk or Qt's Grid/TreeView widgets? That's the one thing that pretty much 99% of the software I've worked on have needed at some point
- black_puppydog 3y agoMight be worth adding a "complete widget" flag to areweguiyet.com but I'm fairly sure that's just an invitation to bickering about the definition of "complete" :P
- j45 3y agoThanks for this summary. It’s one thing that’s kept me away from rust and also webassembly in a similar way.
- bryanlarsen 3y agoIn my limited experience, I would add cacao for MacOS to that list. I believe that having a common language but using native widgets is the sweet spot for many cross platform projects and teams.
- deleted 3y ago[deleted]
- captainmuon 3y agoFor me the litmus test is if it has a fully-featured listview or treeview, so you can do something like a file browser, a library app, or other kinds of data-heavy apps. Also important is that keyboard and mouse work as expected (tabbing, shift-selection, etc). Bonus if it supports the current "native" OS paradigms. E.g. on Mac: transparent sidebar, integrated titlebar, on Windows: MS office 2022 style simplified toolbar/ribbon, and WinUI styling. Note that even the official modern APIs themselves (SwiftUI and WinUI) don't do everything that first party apps can do. Gtk doesn't look native anywhere but at least it has a very complete widget set and has been around for a while.
- nu11ptr 3y agoAgreed - I'm more and more thinking I'll just use Flutter and use gRPC to talk to a Rust backend. It has native looking widgets for each desktop OS (incl sidebars) if I want to go that way otherwise Material 3 is gorgeous IMO. Once they release the secondary window support I think it will be the best desktop UI framework on the market most likely...as it will look more like the new media centric UIs with nice animation, but with a lower resource usage. (Yes, I know about the rust-dart-bridge or whatever, but gRPC gives my product an API at the same time for "free" and without the complexity of a multi-language project).
- rollcat 3y ago> Gtk doesn't look native anywhere but at least it has a very complete widget set and has been around for a while. It's being worked on. https://twitter.com/paulrouget2/status/1595357518913449992 https://twitter.com/paulrouget2/status/1595357518913449992
- chrismorgan 3y agoI’m curious about this, because over the past decade or so, large parts of GTK’s cross-platform ability have been actively sabotaged. It used to be possible to style it to look native on Windows, with some feel problems but mostly comparatively minor. Now, well, no one has quite managed native look (whether or not it’s possible, and certainly I’ll allow that “native” is very ill-defined on Windows these days), and feel is way off in important ways because they’ve deliberately removed a number of important pieces, forcing GNOME HIG conventions. (Things like how they basically force GNOME’s style of overlay scrollbars these days; also keyboard stuff is regularly hopelessly wrong.) The GTK/libadwaita separation is a lie. The GNOME Foundation co-opted GTK and deliberately scupper it for everyone that’s not GNOME (whether on Linux or for other OSes). So I’m curious whether this sort of patch would be accepted. Assuming reasonable quality of patch, it pretty obviously should be if you want to be a cross-platform toolkit that doesn’t feel massively out of place, but without knowing what position or connections Paul Rouget may have, I’m honestly sceptical that such a patch would be accepted.
- tensor 3y agofltk-rs is mature and has a ton of features. Also, its license means that you can bundle it into a single binary without worrying about license contamination.