Live data from Hacker News

I Switched from Flutter and Rust to Rust and Egui

jdiaz97.github.io

21–30 of 148 posts

Re: I Switched from Flutter and Rust to Rust and Egui

#21
post #13
post #9

Earlier 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

By default it re-renders on each event. This isn't often on mobile apps, but moving a mouse across a desktop app triggers multiple vents. There is a function call to request a re-render if you want not to wait for an event.

Re: I Switched from Flutter and Rust to Rust and Egui

#22
post #13

Earlier quoted context omitted.

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

By default it re-renders on each event. This isn't often on mobile apps, but moving a mouse across a desktop app triggers multiple vents. There is a function call to request a re-render if you want not to wait for an event.

So if it's just an idle visible application, does it not render at all because there are no events? Or am I right that there's some idle redrawing going on

Re: I Switched from Flutter and Rust to Rust and Egui

#25
post #5

I 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.

In the end the WYSIWYG would produce an XML file that you can put under version control. All depends on the UI of the thing your are building, if what you are building only needs to be functional and nobody cares about the UI (that is always the case of internal use software, that needs to have a good UX but who cares if it has the Windows 95 style controls, like machine HMIs, ERP software, etc.) WYSIWYG (like Visual Studio) are good to write things fast and typically with a consistent layout. I mean, most companies are not building a videogame, and most people are still fine using things like AS/400, so...

Re: I Switched from Flutter and Rust to Rust and Egui

#26
post #22

Earlier quoted context omitted.

By default it re-renders on each event. This isn't often on mobile apps, but moving a mouse across a desktop app triggers multiple vents. There is a function call to request a re-render if you want not to wait for an event.

So if it's just an idle visible application, does it not render at all because there are no events? Or am I right that there's some idle redrawing going on

With eframe, it does not re-render when idle, no. You need to have another thread that forces it to redraw on your own schedule. It will also redraw when an event occurs (mouse movement, keyboard presses, interacting with the application in general.)

Re: I Switched from Flutter and Rust to Rust and Egui

#27

Immediate mode GUIs are cool but it seems that accessibility support is somewhat lacking. In native frameworks you often get it for free, on the Web you can follow ARIA and get it for free, but with immediate mode GUIs it seems that it is always a bit of an afterthought. For example, it seems that egui supports AccessKit, but not when used on the Web. With Dear ImGui it seems worse, there is some effort in that direc…

The lack of accessibility on the web is less an immediate mode problem and more of a problem with eschewing the web's native UI stack and rendering everything yourself. There are ways to signal to the browser what the content of your custom rendering is, but they very much do not come for free and require much more integration than AccessKit does on native.

Re: I Switched from Flutter and Rust to Rust and Egui

#28

I 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.

Re: I Switched from Flutter and Rust to Rust and Egui

#30

Earlier quoted context omitted.

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.

In the end the WYSIWYG would produce an XML file that you can put under version control. All depends on the UI of the thing your are building, if what you are building only needs to be functional and nobody cares about the UI (that is always the case of internal use software, that needs to have a good UX but who cares if it has the Windows 95 style controls, like machine HMIs, ERP software, etc.) WYSIWYG (like Visual…

But those files are often hard to read and merge. If WYSIWYG really worked well, why aren't more big projects or popular frameworks using it? Why do you think it's become less popular over time?
Post reply on HN