So egui is great for projects where the application runtime is short lived, or for overlays in longer lived projects. The visual equivalent of scripts, where you know you need a small amount of immediate visual feedback and tweaking parameters for it to be useful to the end user. Flutter answers questions about more robust UI. It's good that you chose the right tool for the job and more people should know that there…
Both approaches have their downsides and, in my view, retained mode and immediate mode tend to converge as the UI complexity increases. So far, no problems with implementing any UI I want in my experience with egui on a somewhat complicated application (Desktop word processor). Immediate mode is a breath of fresh air from React. [Edit: although the standard accessibility criticisms apply to my application; although t…
I Switched from Flutter and Rust to Rust and Egui
41–50 of 148 posts
Re: I Switched from Flutter and Rust to Rust and Egui
#42Earlier quoted context omitted.
If your UI is fast enough, why not in complex UI’s either? I’d say it gives you good motivation to keep your UI handling code as fast as possible.
Doesn't egui always re-render? I like my idle apps to be doing nothing, I don't want them running their render loop in the background
This can be problematic, e.g. some of the sensor interfaces I have, I want to always display correct data, even if not focused. So, I have to decide if I want to have old data shown in the background misleading users, or have a per penalty from constant renders. Or try something else to be clever. (Maybe have it update at a low rate if not focused? I think that's the move...)
Re: I Switched from Flutter and Rust to Rust and Egui
#43Not sure that I'd recommend this approach to everyone. Protobuf code generation can be finicky to set up, but I'm doing it so that I can access go's rich array of libraries in my app.
Re: I Switched from Flutter and Rust to Rust and Egui
#44I feel obliged to mention that iced is a fantastic Rust GUI library for more complex applications: https://iced.rs
Since others are sharing Rust GUI libraries, I’ll mention Slint [ https://slint.rs ] a native GUI toolkit written Rust. It has a declarative domain specific languages, editor tools, and has been stable with no breaking API changes since 2023. I'm one of the developers.
https://github.com/slint-ui/slint/blob/master/FAQ.md#licensi...
I only mention this because those constraints are notably more restrictive than the vast majority of the Rust crate ecosystem.
I take no particular stance on whether this is a fair or good practice or about the technical suitability of Slint beyond this concern, I just think it's a hurdle for most people so they should be made aware early and often.
Re: I Switched from Flutter and Rust to Rust and Egui
#45I'm not a UI dev but I have messed with Qt some. Does egui or some other rust framework the same native look that Qt does?
Non-goals
* Become the most powerful GUI library
* Native looking interface
Re: I Switched from Flutter and Rust to Rust and Egui
#46I've been doing something similar to this, except with go. In my case I have a flutter frontend and a go backend that's built using go mobile. Instead of trying to figure out how to make all of my go functions use data types that are supported by the various native frameworks, I've opted to use protobuf objects for every type that is shared between the frontend and backend. This way I can expose a single go function…
Re: I Switched from Flutter and Rust to Rust and Egui
#47There’s a big advantage to having your whole application in one language. I’m not sure the experience of egui on mobile though but egui is great to use as a developer Pros - Solid widget set - Easy to get started - Less state management - Easy to make custom widgets - Active community and crates (e.g docking view, tables, etc.) - Fast to build new Ui Cons - Harder to do layouts (has multipass and some flexbox crates…
Re: I Switched from Flutter and Rust to Rust and Egui
#48I still prefer good old GUI frameworks with WYSIWYG designers.
WYSIWYG designers seem convenient, but they're not that popular anymore for a reason. Writing UI in code is more flexible, easier to maintain, and works better as projects grow.
When hand-writing XAML or similar, it's great to see the UI created live. Like editing markdown and seeing the preview, versus editing markdown and not seeing the preview.
Re: I Switched from Flutter and Rust to Rust and Egui
#49I've been doing something similar to this, except with go. In my case I have a flutter frontend and a go backend that's built using go mobile. Instead of trying to figure out how to make all of my go functions use data types that are supported by the various native frameworks, I've opted to use protobuf objects for every type that is shared between the frontend and backend. This way I can expose a single go function…
Re: I Switched from Flutter and Rust to Rust and Egui
#50I feel obliged to mention that iced is a fantastic Rust GUI library for more complex applications: https://iced.rs
Since others are sharing Rust GUI libraries, I’ll mention Slint [ https://slint.rs ] a native GUI toolkit written Rust. It has a declarative domain specific languages, editor tools, and has been stable with no breaking API changes since 2023. I'm one of the developers.