| ▲ | piker 3 hours ago |
| Rust GUI is in a tough spot right now with critical dependencies under-staffed and lots of projects half implemented. I think the advent of LLMs has been timed perfectly to set the ecosystem back for a few more years. I wrote about it, and how it affected our development yesterday: https://tritium.legal/blog/desktop |
|
| ▲ | lazypenguin 24 minutes ago | parent | next [-] |
| Your recent post resonated with me deeply, as someone heavily invested in the Rust GUI I've fallen into this same conundrum. I think ultimately the Rust GUI ecosystem is still not mature and as a consequence we have to make big concessions when picking a framework. I also came to a similar endpoint when building out a fairy large GUI application using egui. While egui solves the "draw widgets" part of building out the application, inevitably I had to restructure my app entirely with a new architecture to make it maintainable. In many places the "immediate" nature of the GUI mutable editing the state was no longer an advantage. Not to mention that UI code I wrote 6 months ago became difficult to read, especially if there was advanced layout happening. Ultimately I've boiled my choices down to: - egui for practicality but you pay the price in architecture + styling - iced for a nice architecture but you have to roll all your own widgets - slint maybe one day once they make text rendering a higher priority but even then the architecture side is not solved for you either - tauri/dioxus/electron if you're not a purist like me - Rewind 20 years and use Qt/WPF/etc. |
|
| ▲ | pjmlp 3 hours ago | parent | prev | next [-] |
| Interesting read, however as someone from the same age group as Casey Muratori, this does not make much sense. > The "immediate mode" GUI was conceived by Casey Muratori in a talk over 20 years ago. Maybe he might have made it known to people not old enough to have lived through the old days, however this is how we used to program GUIs in 8 and 16 bit home computers, and has always been a thing in game consoles. |
| |
| ▲ | JimDabell an hour ago | parent | next [-] | | I think this is the source of the confusion: > To describe it, I coined the term “Single-path Immediate Mode Graphical User Interface,” borrowing the “immediate mode” term from graphics programming to illustrate the difference in API design from traditional GUI toolkits. — https://caseymuratori.com/blog_0001 Obviously it’s ludicrous to attribute “immediate mode” to him. As you say, it’s literally decades older than that. But it seems like he used immediate mode to build a GUI library and now everybody seems to think he invented immediate mode? | |
| ▲ | kllrnohj an hour ago | parent | prev | next [-] | | There's also good reasons that immediate mode GUIs are largely only ever used by games, they are absolutely terrible for regular UI needs. Since Rust gaming is still largely non-existent, it's hardly surprising that things like 'egui' are similarly struggling. That doesn't (or shouldn't) be any reflection on whether or not Rust GUIs as a whole are struggling. Unless the Rust ecosystem made the easily predicted terrible choice of rallying behind immediate mode GUIs for generic UIs... | |
| ▲ | Jtsummers 2 hours ago | parent | prev | next [-] | | It's like the common claim that data-oriented programming came out of game development. It's ahistorical, but a common belief. People can't see past their heroes (Casey Muratori, Jonathon Blow) or the past decade or two of work. | | |
| ▲ | dijit an hour ago | parent | next [-] | | I partly agree, but I think you're overcorrecting. Game developers didn't invent data-oriented design or performance-first thinking. But there's a reason the loudest voices advocating for them in the 2020s come from games: we work in one of the few domains where you literally cannot ship if you ignore cache lines and data layout. Our users notice a 5ms frame hitch- While web developers can add another React wrapper and still ship. Computing left game development behind. Whilst the rest of the industry built shared abstractions, we worked in isolation with closed tooling. We stayed close to the metal because there was nothing else. When Casey and Jon advocate for these principles, they're reintroducing ideas the broader industry genuinely forgot, because for two decades those ideas weren't economically necessary elsewhere. We didn't preserve sacred knowledge. We just never had the luxury of forgetting performance mattered, whilst the rest of computing spent 20 years learning it didn't. | | |
| ▲ | Jtsummers an hour ago | parent [-] | | > I think you're overcorrecting. I don't understand this part of your comment, it seems like you're replying to some other comment or something not in my comment. How am I overcorrecting? A statement of fact, that game developers didn't invent these things even though that's a common belief, is not an overcorrection. It's just a correction. | | |
| ▲ | dijit 19 minutes ago | parent [-] | | Ah, I read your comment as "game devs get too much credit for this stuff and people are glorifying Casey and Jon" and ran with that, but you were just correcting the historical record. My bad. I think we're aligned on the history; I was making a point about why they're prominent advocates today (and why people are attributing invention to them) even though they didn't invent the concepts. |
|
| |
| ▲ | moregrist 29 minutes ago | parent | prev [-] | | It clearly didn’t come out of game dev. Many people doing high performance work on either embedded or “big silicon” (amd64) in that era were fully aware of the importance of locality, branch prediction, etc But game dev, in particular Mike Acton, did an amazing job of making it more broadly known. His CppCon talk from 2014 [0] is IMO one of the most digestible ways to start thinking about performance in high throughput systems. In terms of heroes, I’d place Mike Acton, Fabian Giesen [1], and Bruce Dawson [2] at the top of the list. All solid performance-oriented people who’ve taken real time to explain how they think and how you can think that way as well. I miss being able to listen in on gamedev Twitter circa 2013 before all hell broke loose. [0] https://youtu.be/rX0ItVEVjHc?si=v8QJfAl9dPjeL6BI [1] https://fgiesen.wordpress.com/ [2] https://randomascii.wordpress.com/ |
| |
| ▲ | piker 3 hours ago | parent | prev | next [-] | | I mean, fair enough, but [at least] wikipedia agrees with that take. > Graphical user interfaces traditionally use retained mode-style API design,[2][5] but immediate mode GUIs instead use an immediate mode-style API design, in which user code directly specifies the GUI elements to draw in the user input loop. For example, rather than having a CreateButton() function that a user would call once to instantiate a button, an immediate-mode GUI API may have a DoButton() function which should be called whenever the button should be on screen.[6][5] The technique was developed by Casey Muratori in 2002.[6][5] Prominent implementations include Omar Cornut's Dear ImGui[7] in C++, Nic Barker's Clay[8][9] in C and Micha Mettke's Nuklear[10] in C. https://en.wikipedia.org/wiki/Immediate_mode_(computer_graph... [Edit: I'll add an update to the post to note that Casey Muratori simply “coined the term” but that it predates his video.] | | |
| ▲ | pjmlp 2 hours ago | parent | next [-] | | Dig out any source code for Atari, Spectrum or Commodore 64 games, written in Assembly, or early PC games, for example. And you will see which information is more accurate. | | |
| ▲ | piker 2 hours ago | parent [-] | | Yeah no doubt you're correct. I wasn't disagreeing - just establishing the reasonableness of my original statement. I must have read it in the Dear ImGui docs somewhere. |
| |
| ▲ | an hour ago | parent | prev | next [-] | | [deleted] | |
| ▲ | vodou 2 hours ago | parent | prev | next [-] | | I am pretty sure there are people here qualified enough to edit that Wikipedia page in a proper way. | |
| ▲ | arandomhuman 2 hours ago | parent | prev [-] | | Wikipedia clearly has never been shown to have faults regarding accuracy. | | |
| |
| ▲ | PKop 2 hours ago | parent | prev [-] | | > Maybe he might have made it known to people Yes, he coined the term rather than invent the technique | | |
| ▲ | adastra22 an hour ago | parent | next [-] | | He definitely did not name it. IRIS GL was termed “immediate mode” back in the 80’s. | | |
| ▲ | andypants 36 minutes ago | parent [-] | | He coined the term in the context of UI, by borrowing the existing term that was already used in graphics. Drawing that parallel was the point. | | |
| ▲ | adastra22 6 minutes ago | parent [-] | | It might be more accurate to say that he repopularized the term among a new generation of developers. Immediate vs Retained mode UI was just as much a thing in early GUIs. It was a swinging pendulum. At first everything was immediate mode because video RAM was very scarce. Initially there was only enough VRAM for the frame buffer, and hardly any system RAM to spare. But once both categories of RAM started growing, there was a movement to switch to retained mode UI frameworks. It wasn’t until the early 00’s that GPUs and SIMD extensions tipped the scales in the other direction - it was faster to just re-render as needed rather than track all these cached UI buffers, and allowed for dynamic UI motifs “for free.” My graying beard is showing though, as I did some gave dev in the late 90’s on 3Dfx hardware, and learned UI programming on Win95 and System 7.6. Get off my lawn. |
|
| |
| ▲ | pjmlp an hour ago | parent | prev [-] | | I won't be bothered to go hunting for digital copies of 1980's game development books, but I have my doubts on that. |
|
|
|
| ▲ | jsheard 2 hours ago | parent | prev | next [-] |
| > Rust GUI is in a tough spot right now with critical dependencies under-staffed and lots of projects half implemented. Down the stack, low-level 3D acceleration is in a rough spot too unfortunately. The canonical Rust Vulkan wrapper (Ash) hasn't cut a release for nearly two years, and even git main is far behind the latest spec updates. |
| |
| ▲ | the__alchemist 43 minutes ago | parent | next [-] | | I am not convinced a thin FFI wrapper needs frequent updates, pending updates to the underlying API. What updates do you think it should have? | | |
| ▲ | jsheard 40 minutes ago | parent [-] | | The underlying Vulkan API is updated constantly, the last spec update was about two weeks ago. Even if we only count the infrequent major milestone versions, Ash is still stuck at Vulkan 1.3, when Vulkan 1.4 launched in December of 2024. | | |
| ▲ | hickelpickle 25 minutes ago | parent | next [-] | | Damn, I just dove back into a vulkan project I was grinding through to learn graphics programing, life and not having the time to chase graphic programming bugs led me to put it aside for a year and a half and these new models were able to help me squash my bug and grok things fully to dive back in, but I never even consider that the rust vulkan ecosystem was worse off. it was already an insane experience getting imgui, winit and ash to play nice together, after bouncing back and forth between WGPU, I assume vulkan via ash was the safer bet. IIRC there is another raw vulkan library that just generated bindings as well and stayed up to date but that comes with its own issues. | | |
| ▲ | the__alchemist 23 minutes ago | parent [-] | | Vulkano? I remember that! Looks like it was updated last week, but I don't know if it's current with the Vulkan API, nor how it generally compares to Ash. WGPU + Winit + EGUI + EGUI component libs is its own joy of compatibility, but anecdotally they have been updating in reasonable sync. things can get out of hand if you wait too long between updates though! | | |
| ▲ | jsheard 9 minutes ago | parent | next [-] | | Vulkano is a somewhat higher level library which tries to be safe and idiomatic. It looks like it generates its own Vulkan bindings directly from the vk.xml definitions, but it also depends on Ash, and this comment suggests that both generators need to be kept in sync so they're effectively beholden to Ash's release cadence anyway. https://github.com/vulkano-rs/vulkano/blob/master/Cargo.toml... Maybe they do it that way so they can interop with other crates which use Ash's types? | |
| ▲ | 19 minutes ago | parent | prev | next [-] | | [deleted] | |
| ▲ | 16 minutes ago | parent | prev [-] | | [deleted] |
|
| |
| ▲ | the__alchemist 34 minutes ago | parent | prev [-] | | Ah... that does make sense. |
|
| |
| ▲ | adastra22 an hour ago | parent | prev [-] | | The canonical Vulkan wrapper is wgpu. | | |
|
|
| ▲ | ndiddy an hour ago | parent | prev | next [-] |
| Honestly I think all native GUI is in a tough spot right now. The desktop market has matured so there aren't any large companies willing to put a ton of money into new fully featured GUI libraries. What corporate investment we do see into new technologies (Electron, SwiftUI, React Native) is mainly to allow developers to reuse work from other platforms like web and mobile in order to cut costs on desktop development. Without that corporate investment I don't think we'll ever see any new native GUI libraries become as fully featured as Win32 or Qt Widgets. |
|
| ▲ | queuebert 2 hours ago | parent | prev | next [-] |
| This is why I'm using LLMs to help me hand code the GUI for my Rust app in SDL2. I'm hoping that minimizing the low-level, drawing-specific code and maximizing the abstractions in Rust will allow me to easily switch to a better GUI library if one arises. Meanwhile, SDL is not half bad. |
|
| ▲ | api an hour ago | parent | prev | next [-] |
| Open source GUI development is perpetually cursed by underestimating the difficulty of the problem. A mature high-quality GUI with support for all the features of a modern desktop UI, accessibility, support for all the display variations you encounter in the wild, high quality rendering, high performance, low overhead, etc. is a development task on par with creating a mature game engine like Unity. Nearly all open source GUI projects get 80% of the way there and stall, not realizing that they are only 20% of the way there. |
| |
| ▲ | kbelder 2 minutes ago | parent [-] | | You're right, and I think that's because the core functionality of a UI lib is not too difficult. I've tinkered in that space myself, and it's a fun side project. Then you start to think about full unicode support, right-to-left rendering, and so on. Then you start to think about properly implementing accessibility features. The necessary work increases by a magnitude. And it's not fun work. So you stall out with a bare-bones implementation. |
|
|
| ▲ | paddy_m 2 hours ago | parent | prev | next [-] |
| I'd love to read a writeup of the state of Rust GUI and the ecosystem if you could point me at one. |
| |
| ▲ | IshKebab 2 hours ago | parent [-] | | https://www.boringcactus.com/2025/04/13/2025-survey-of-rust-... I started writing a program that needed to have a table with 1 million rows. This means it needs to be virtualised. Pretty common in GUI libraries. The only Rust GUI library I found that could do this easily was gpui-component (https://github.com/longbridge/gpui-component). It also renders text crisply (rules out egui), looks nice with the default style (rules out GTK, FLTK, etc.), isn't web-based (rules out Dioxus), was pretty easy to use and the developers were very responsive. Definitely the best option today (I would say it's probably the first option that I haven't hated in some way). The only other reasonable choices I would say are: * egui - doesn't render very nicely and some of the APIs are amateurish, but it's quick and it works. Good option for simple tools. * Iced - looks nice and seemed to work fairly well. No virtualised lists though. * Slint (though in some ways it is weird and it requires quite a lot of boilerplate setup). All the others will cause you pain in some way. I think the "ones to watch" are: * Makepad - from the demos I've seen this looks really cool, especially for arty GUI projects like synthesizers and car UIs. However it has basically no documentation so don't bother yet. * Xilem - this is an attempt to make an 100% perfect Rust GUI library, which is cool and all but I imagine it also will never be finished. | | |
| ▲ | nicoburns an hour ago | parent | next [-] | | I wouldn't bother watching Makepad. They're in the process of rewriting the entire thing with AI and (it seems to me) destroying any value they has accumulated. And I also suspect Xilem will never be finished. Beyond egui/Iced/Slint, I'd say the "ones to watch" are: * Freya * Floem * Vizia I think all three of those offer virtualized lists. Dioxus Native, the non-webview version of Dioxus is also nearing readiness. | |
| ▲ | WD-42 2 hours ago | parent | prev | next [-] | | I’m currently writing an application that uses virtual lists in GTK: GtkListView, GtkGridView, there may be others. You ruled out GTK because of its looks I guess, I’m targeting Linux so the looks are perfect. | | |
| ▲ | nu11ptr 2 hours ago | parent [-] | | Yeah, I need cross platform, and GTK looks quite foreign on Windows/macOS IMO. I toyed with custom themes, but couldn't find any I liked for a cross platform look (wanted something closer to Fluent UI). |
| |
| ▲ | chiffaa 2 hours ago | parent | prev | next [-] | | I believe latest Iced versions do have a `Lazy` widget wrapper, but I believe that effectively means you need to make your own virtual list on top of it | | |
| ▲ | tribaal 2 minutes ago | parent [-] | | Custom widgets aren’t particularly hard to do in iced, but I wish some of those common cases would be committed back / made available. Except the above virtualised lists, another case I hit was layered images (sprites for example). Not very hard to write my own, sure, but it’d be nice to have that out of the box as in eg. egui |
| |
| ▲ | cess11 2 hours ago | parent | prev [-] | | I've been somewhat involved in a project using Iced this week, seems pretty reasonable. Not sure how tricky it would be to e.g. invent custom widgets though. |
|
|
|
| ▲ | kelvinjps10 2 hours ago | parent | prev | next [-] |
| I don't feel like having one main library for creating windows it's bad, I feel like that way the work gets shared and more collaboration happens |
|
| ▲ | nu11ptr 3 hours ago | parent | prev | next [-] |
| Really? It seems better than ever to me now that we have gpui-component. That seems to finally open doors to have fully native guis that are polished enough for even commercial release. I haven't seen anything else that I would put in that category, but one choice is a start. |
| |
| ▲ | piker 3 hours ago | parent | next [-] | | The problem is that Zed has understandably and transparently abandoned supporting GPUI as an open source endeavour except to the extent contributions align with its business mission. | | |
| ▲ | nu11ptr 2 hours ago | parent [-] | | I remember when that came out, but I'm not sure I understand the concern. They use GPUI, so therefore they MUST keep it working and supportable, even if updating it isn't their current priority. Or are you saying they have a closed source fork now? Actually, this story is literally them changing their renderer on linux, so they are maintaining it. > except to the extent contributions align with its business mission Isn't that every single open source project that is tied to a commercial entity? | | |
| ▲ | piker 2 hours ago | parent [-] | | I don't know what the message means exactly, but I can't plan to build on GPUI with it out there, especially when crates that don't carry that caveat are suffering from being under-resourced. | | |
| ▲ | nu11ptr 2 hours ago | parent [-] | | IMO, as long as Zed uses it, we are safe. If it doesn't, we aren't. I'm keeping it that simple. |
|
|
| |
| ▲ | atombender 2 hours ago | parent | prev [-] | | I tried gpui recently and I found it to be very, very immature. Turns out even things like input components aren't in gpui, so if you want to display a dialog box with some text fields, you have to write it from scratch, including cursor, selection, clipboard etc. — Zed has all of that, but it's in their own internal crates. Do you know how well gpui-component supports typical use cases like that? Edit boxes, buttons, scroll views, tables, checkbox/radio buttons, context menus, consistent native selection and clipboard support, etc. are table stakes for desktop apps. | | |
|
|
| ▲ | karel-3d 2 hours ago | parent | prev | next [-] |
| Can I humbly ask how are LLMs and Rust GUIs related? |
| |
| ▲ | piker 2 hours ago | parent | next [-] | | They're just straining already-strained resources on the "contributions" side and pushing interest in other directions (e.g. Electron). | |
| ▲ | tonyedgecombe 2 hours ago | parent | prev [-] | | What’s the point of writing open source if it’s just going to be vacuumed up by the AI companies and regurgitated for $20 a month. |
|
|
| ▲ | airstrike 2 hours ago | parent | prev [-] |
| iced is doing great |