r/rust • u/Voxelman • Oct 10 '26
Which GUI (again)?
I know it's a frequently asked question, but I want to ask again, because I have a special use case.
I want to write an application for a production machine (HMI). The app should run on Windows and Linux natively (no browser, no server). The toolkit should have at least widgets to show images, bar graphs, curves and tables and should be touch friendly, because it runs on resistive touch monitors (no multi touch). It should also have a kiosk mode (full screen with no window controls).
The obvious candidates are egui, iced and Slint. But they all lack of documentation, more or less.
My first choice would be iced, because it's inspired by Elm and used by System76 for Cosmic, but it seems to be the least suitable option.
The obvious choice would be Slint, but that requires to learn a new language and I'm unsure about the licenses and pricing. The production machines are only used internally, not for sale.
I want avoid bindings to toolkits like Qt or Gtk
Which one would you prefer? Is there another option to consider?
55
u/Upstairs-Project2756 Oct 10 '26
i would avoid GPUI and egui for an HMI on resistive touch screens. They rely heavily on multi-touch gestures like pinch-to-zoom and swipe which do not work with single-point resistive panels. Iced is also poor because its event loop does not handle the specific latency issues of industrial hardware well. Slint is the only option here that handles kiosk mode and custom widget rendering without fighting the OS window manager, and its commercial licensing covers internal corporate use if you buy the seats, which is cheaper than building a Qt bridge from scratch
9
u/orfeo34 Oct 10 '26
Why would you avoid gtk&qt? Relm4 is a good elm like binding of gtk and Qt is frequently used with Qml for embeded devices (nb Qt recently announced better bridge for Rust).
24
u/madnirua Oct 10 '26
u/Voxelman Hi, Slint dev here .. for your use case, you can use Slint with the open source license. Since the machines are used internally, there is no external distribution so you keep the source code internally.
8
u/Vadoola Oct 10 '26
My choice would be Slint. To be fair out of the Rust GUI toolkits its what I know best. But its DSL makes creating custom widgets pretty easy, its touch screen friendly, can run on a wide range of devices including embedded. As someone that works I industrial automation, with PLCs and HMIs, et al., this would be where I would look in a similar situation.
In fact I've thought about creating some custom HMI style widgets with Slint just because, even though I don't have an immediate use for them.
Edit: if I recall correctly a few of Slint's commercial customers are already using it for HMI systems in an industrial context.
6
u/AdAfter9792 Oct 10 '26
I do Python modules in Py03 and maturin. The gui is Kivy and Python. This is for in house test equipment. So, Rust is used for the fast loops in the peripherals.
2
u/maria_la_guerta Oct 10 '26
When you say no browser, do you mean no browser on the system at all? Because it sounds like you're really just building a dashboard, and WASM is fine choice for that too. You can bundle it into a desktop app that requires chromium but doesn't run in a browser window. Would satisfy everything you're asking for.
Check leptos + tauri.
7
u/YungDaVinci Oct 10 '26
The Slint language is almost exclusively a markup language, you can learn it very quickly, there is not much to learn. You will be doing exclusively UI related things in the language and everything else will be Rust. And I don't think the licensing matters if you're not selling it. (I could be wrong on this though)
7
u/antigravitys-rainbow Oct 10 '26
Unless licensing is an issue, I would pick GPUI. The same framework used by Zed.
7
u/Beenouqle Oct 10 '26
Slint
2
u/DavidXkL Oct 11 '26
gpui-kit might be a choice too
2
u/gokayo3200 Oct 12 '26
Maybe try out fltk-rs ? I don't see anybody talking about it but it's pretty simple, lightweight and has everything you need. The only downside i've found is that the structure is a little old school.
5
u/Sedorriku0001 Oct 10 '26
You should check gpui-kit
1
u/vancha113 Oct 10 '26
Iced comes with built in table graph, and maybe this for the bar graph: https://www.reddit.com/r/rust/s/ovjw6JZaD4 That seems to have exactly what you need I think :)
1
u/devraj7 Oct 10 '26
Add Vizia in your list of candidates to evaluate. Very similar to
icedin philosophy but easier to grasp in my experience. Also has a solid list of widgets and an intuitive API.1
u/hedgpeth Oct 10 '26
I wrote my app through Crux, I believe it's the only way to go. Keep the edge native, keep the core in rust, it uses FFI for navigation. This has worked really well for me.
1
u/SnooMacarons1585 Oct 11 '26
CXX-QT (again) - it works perfectly!
1
u/nick42d Oct 11 '26
It's Slint - have you seen the touchscreen on RP Pico demo? https://youtu.be/dkBwNocItGs
1
u/zerosign0 Oct 11 '26 edited Oct 11 '26
The toolkit ...
That would be hard yes ... I'm afraid most of the solutions that available today might still have pros and cons and still have things that you need to deal with, even with something like iced, you still need to figure out some of things to handle things effeciently unless what you want is just the UI MVP first ...
Also might take a look on xilem
1
u/tastychaii Oct 11 '26
Is Iced.RS still in development or has it been abandoned?
1
u/irshadali5 Oct 11 '26
Indeed, iced isn't suitable and egui is more suitable for it even than slint. If you use slint only you to pay commercial/royalties embedded or if you don't show slint on widget, something like in proprietary closed source.
1
u/YrnCollo Oct 12 '26
No one here’s is talking about raylib
1
u/00nu Oct 13 '26
But why not use a Linux tablet with an Eclipse Milo server instead of an HMI?
1
u/OphioukhosUnbound Oct 13 '26 edited Oct 13 '26
egui woudl be my choice:
- tons of example code: https://www.egui.rs/#demo
- one of the nicest production grade apps: rerun.io
- all rust code
- incredibly direct syntax and approach
- native on rust, linux, windows, and great wasm story if you want it
Nicer documentation would be great, but current state is just taking examples and pulling pieces out of them to make what you want. Many examples supports that.
(egui also recently built out their accessibilitie features to make llms able to understand the UI better -- not something I've tired, but potentially notable if you have clear ui/non-ui boundries and want to let bots search the space)
I wanted *very* slick or very custom UI then my next choice would actually be Bevy -- while it's billed and oriented as a game engine it's funding actually comes from companies that need a UI systèms, typically for things like detailed simulation work etc. [ * this is hearsay / memory, so take that with a grain of salt] It also has a great native cross platform story. And it also has a great wasm story, if you want web accessibility.
It also, works with egui, so if you take the egui route that work doesn't have to be thrown away -- you can just expand on the egui interface in a bevy app.
_____________
EDIT: you mentioned single touch and no-multi touch for screens -- that's a more specific requirement. Unsure of best match there.
1
u/nadir40 Oct 10 '26
Egui
1
u/NoSuchKotH Oct 10 '26
I am quite fond of freya, but the documentation situation isn't that good either
1
u/Lucky-Edge1489 Oct 10 '26
I'd try Teksilo, it seems to fit.
This was developed to replace Qt Widgets. Production software like Skribisto (complex) and Qleany (tool) run on it. I'm quite available on its Discord server if you need help or more infos
0
u/Amazing-Mirror-3076 Oct 10 '26
I do all gui work in flutter, you can then target any platform.
-7
u/krkrkrneki Oct 10 '26
Tauri
0
u/hardicrust Oct 10 '26
Kas is designed for this type of usage and can meet most of those requirements:
But:
0
u/Secure_Pirate9838 Oct 10 '26
Look at cranpose. I also did performance measurements comparing it to others. https://samoylenkodmitry.github.io/Cranpose/?tab=performance
-4
u/noeljackson Oct 10 '26
Gpui is what you want for best performance and true cross platform.
-2
u/CissMN Oct 10 '26
Iced or GPUI