Advice for the next 100 Rust GUIs linebender.org · 201 points · 91 comments · HN...
HN Best 30 @best30
Advice for the next 100 Rust GUIs linebender.org · 201 points · 91 comments · HN thread
TL;DR Raph Levien, a follow-up to his 2022 post on Rust GUI toolkits, argues that Rust UI is now worth pursuing for performance and that AI-assisted coding lowers the cost of Rust. He reports that text layout (Parley) and accessibility (AccessKit) are largely solved, while system compositor integration and the immediate vs retained mode choice remain open, and he advises toolkit builders to be bold, build on solid foundations and use specs.
- About 20 Rust GUI toolkits have been announced since the 2022 post, and interest has accelerated with AI-driven rewrites; Zed's GPUI is used by Discord for AI-driven rewrites.
- For mobile, a practical pattern is native UI (UIKit/SwiftUI/Android) with shared business logic in Rust, as Shopify (abandoning React Native) and 1Password reportedly do.
- Parley is now the text layout solution used by most new Rust UI toolkits; AccessKit is used by most toolkits, though performance overhead with accessibility enabled remains a problem, especially for egui.
- System compositor integration (e.g. CALayer-style layers, video in hardware layers) is still largely unimplemented in toolkits; the subduction library is an early step.
- Immediate mode is good for the first 90% but harder to make production-ready (stable identity for accessibility, caching of layouts); the author is not convinced it suits productivity and design apps.
- He suggests separating design from execution, adapting web standards with a leaner subset (e.g. lighter tree than DOM, curated CSS), and using Blitz and the Xilem/Masonry split as examples.
Discussion The thread mostly consists of practitioners comparing the Rust GUI options they have used, with Slint, egui, Qt, Flutter and GPUI coming up most often. Much of the discussion is about concrete trade-offs: memory footprint of Slint versus Qt and Electron, embedding 3D views in native UIs, and whether Rust is worth it at all given LLM-assisted coding. The mood is technical and mostly constructive, with some skepticism about the Rust bandwagon and a long sub-thread on immediate versus retained mode performance that stays civil.
- Immediate mode (egui) is fast and practical for many apps (some): Several commenters building apps with egui report good performance and simplicity, and argue that the criticism of immediate mode is not backed by evidence. One cited benchmark comparing Dear ImGui and egui against retained-mode apps like VSCode and YouTube, though others questioned whether refresh rates were equalized.
- Retained mode scales better for productivity apps (some): Raph Levien and others argue that once immediate-mode toolkits add caching and accessibility trees, they become hybrids, and that retained mode is a better foundation for design and productivity software.
- Slint is a serious, mature option with free licensing (some): Slint staff and users point to its open-source desktop and mobile licensing, API stability since 1.0, accessibility and certification work for automotive and medical markets.
- Slint and similar toolkits use too much RAM (a few): One commenter measured Slint's hello-world at around 70 MB GPU memory and a spike to 300 MB on resize, judging it heavy compared to Qt Widgets. Slint staff responded with a benchmark showing much lower figures for the software renderer.
- Rust is not worth it for UI; use existing mature languages or toolkits (a few): Some argue the case for Rust GUI is weak, that mobile webviews are already acceptable, and that mature options like Qt, Flutter, or C++/Swift native toolkits are better choices than an immature Rust ecosystem.
- Language choice matters less now that AI writes the code (a few): A few commenters say the language is increasingly irrelevant because AI writes most code, though others counter that memory use and performance still matter, especially with RAM prices.
- Qt or bridges to Qt, Flutter with Rust bridge are good pragmatic paths (a few): Commenters suggest keeping business logic in Rust while using Qt or Flutter for UI, noting that Qt's signal/slot system and compliance track record are valuable.
Links from the comments
- Native Shell (nsh), a retained-mode Rust UI framework started in October 2026 that a commenter found promising, though others found its docs hard to read.
- Benchmark post comparing power and performance of immediate-mode and retained-mode GUIs, cited in the immediate vs retained debate.
- Dioxus Native example showing embedding a wgpu texture in a native UI.
- IUP fork with native-control backends and canvas/GL canvas controls, offered as a cross-platform option.
- Article on the history and current status of MFC, raised in reply to the claim that Windows has no clear native choice.
#rustGui #uiToolkits #immediateMode #retainedMode #mobileUi #crossplatform