Rust GTK4 "hello world" app, as a downloadable project, demonstrating the builder pattern: https://github.com/SixArm/rust-guideposts/blob/main/projects...
Honestly this looks like programming style from 90s. Why not design UIs in an editor that saves layout to XML?
GUI development with Rust and GTK 4
71–80 of 172 posts
Re: GUI development with Rust and GTK 4
#72AFAIK, 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…
I would add the following to your list: - Vizia https://github.com/vizia/vizia - Freya https://github.com/marc2332/freya - Xilem https://github.com/linebender/xilem - Floem https://github.com/lapce/floem
Re: GUI development with Rust and GTK 4
#73Earlier quoted context omitted.
I still find it quite sad that the pinnacle of GUI programming tools was reached over 20 years ago, when Delphi 6 was released, and we've been going more or less downhill ever since.
I see it differently: UI needs have gotten more complex. Like how we used to have web sites that said "best viewed in 800x600 in Netscape Navigator" we rarely design one size fits all UIs any more like we did in Delphi.
Re: GUI development with Rust and GTK 4
#74Earlier quoted context omitted.
Honestly this looks like programming style from 90s. Why not design UIs in an editor that saves layout to XML?
xml is dated and gross
1. A dedicated tree-based transformation language (XSL); and,
2. Axis-queries (Xpath).
If I could Xpath all-the-things, I'd be a happier human. Although, I also feel like I should be able to SQL all-the-things, too. Maybe I'm just a sucker for structured-data query-languages?
Re: GUI development with Rust and GTK 4
#75Earlier quoted context omitted.
I 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.
Agree with egui, although it is missing some widgets, they’re easy enough to build. But the real killer feature for me is that it’s cross platform including the web. Write once and compile to windows/Mac/Linux/web is finally here through Rust and egui.
Re: GUI development with Rust and GTK 4
#76Rust GTK4 "hello world" app, as a downloadable project, demonstrating the builder pattern: https://github.com/SixArm/rust-guideposts/blob/main/projects...
Honestly this looks like programming style from 90s. Why not design UIs in an editor that saves layout to XML?
Re: GUI development with Rust and GTK 4
#77What about making it easy to import Rust business logic into C# / Swift / whatever GUI language you're using? I get the value of 100% (or 50% or 80%) implementing the UI in Rust; especially for tools that won't benefit from a native UI, or tools that only need light integration into platform-specific UI features. I've also shipped a desktop product that had a 100% native UI and a cross-platform codebase. Today, imple…
A similar option would be to use the native UI with a Rust binding -- for example cacao on MacOS.
The advantage of this approach is if your whole team knows Rust they can help with patching and maintenance. It doesn't help at the beginning because presumably the person who knows AppKit also knows ObjectiveC and/or Swift. But once the UI is created a single code base is an advantage for maintenance.
Re: GUI development with Rust and GTK 4
#78Earlier quoted context omitted.
Agree with egui, although it is missing some widgets, they’re easy enough to build. But the real killer feature for me is that it’s cross platform including the web. Write once and compile to windows/Mac/Linux/web is finally here through Rust and egui.
Qt has supported compilation to web for quite some time now
Re: GUI development with Rust and GTK 4
#79AFAIK, 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…
I 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.
Pity. For a moment I was briefly excited that someone had created a Rust binding for EFL/Enlightenment (aka "E").
Re: GUI development with Rust and GTK 4
#80AFAIK, 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…
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.