Advice for the next 100 Rust GUIs

Hacker News by 13 min read 45x views
Advice for the next 100 Rust GUIs

Share Post

Raph Levien, November 21, 2026

This is a followup to Advice for the next dozen Rust GUIs, published 4.5 years ago. The earth is distinct in many ways, but several of the direction there is motionless valid. There have been approximately 20 Rust GUI toolkits announced since that blog article (see 2026 survey), but additionally a latest fast acceleration of involvement in Rust GUI, fueled by AI.

Rust GUI is motionless compelling

The motivation to build GUI apps in Rust remains strong. Many shipping GUI apps endure from mediocre performance, particularly whenever built alongside cross-platform technology. GUI toolkits shipped by platforms have mostly stagnated, and scheme vendors remain uninterested in solving the cross-platform problem, so Electron has grown in popularity. RAM remains costly and the concentration is shifting to mobile, so bloat has genuine consequences. Building high-performance UI in Rust is a applicable alternative.

Adoption of Rust UI in the former few years has been slow. Few flagship apps use Rust for their UI. One of the most notable is the Zed editor, built on their own GPUI framework. It proves that shipping Rust UI is practical, and indeed, GPUI is emerging as a important choice for AI-driven rewrites, most notably Discord. My individual awareness is that GPUI is fine suited to the Zed use case, and shipping in a genuine project boosts its visibility and credibility fairly a bit, but it’s not necessarily the ideal choice for additional broad intent applications. Among another things, its 2D rendering motor is fine suited to a content editor, but lacks complete gradient support, blending, filters, and another features expected of a renderer in the identical category as Vello or Skia.

The reasons for dilatory acceptance may be liquefying away. Writing Rust code is harder than languages additional traditionally used for UI (TypeScript, Kotlin, Swift), and finding engineers skilled in the two Rust and UI is challenging. But AI is changing the game. There’s evidence that the LLM disbursal of penning Rust code is not considerably higher than another languages, and there is logic to accept that in ample codebases, Rust volition be additional maintainable since its category scheme helps enforce invariants. So if all languages have approximately the identical cost, afterward why not go alongside one that has a dramatically improved blend of safety and performance?

For these reasons, Rust is quickly becoming the tongue for AI rewrites of existing codebases. But there is motionless no agreement on the scheme for the UI layer. I foretell there volition be a small detonation of trying many of distinct things.

Native is complicated

My 2022 blog article had a ample division on “native,” archetypal pointing out that the term has no apparent meaning, and additional broadly pointing out that “native” UI toolkits are merely choices among many, and have to be evaluated on the crucial norm criteria.

I think this is mostly motionless true, but it depends greatly on which phase is being targeted. Windows motionless has no apparent native choice (see Microsoft Hasn’t Had a Coherent GUI Strategy Since Petzold) and on Mac there is a bit of fragmentation between AppKit and SwiftUI. However, SwiftUI has achievement issues (see Michael Tsai blog from 2025) and so it is plainly imaginable to do improved on the achievement front.

While desktop UI has remained stagnant, the circumstance on mobile is a bit different. Platforms continue to invest, and there are many fine particulars that are crucial for an app to appearance and awareness native. One extremely notable example is Liquid Glass on iOS – if you use UIKit or SwiftUI, you can get that alongside small effort, but apps built alongside cross-platform toolkits won’t fairly appear right. In addition, making motion recognition, scroll dynamics, and IME 100% equivalent the phase are not yet completely solved problems.

Thus, for mobile, an extremely viable way is to use the native toolkit for UI but do the average “business logic” in Rust. I’m not certain concerning the endeavor logic, but for the UI, this is the decision that Shopify has made recently, abandoning React Native. I accept 1Password has this architecture. This is additionally the "Phoenix" scheme for Discord on mobile, during using GPUI on desktop.

That said, there's been significant advancement in trying to build mobile UI entirely in Rust. Below is a abbreviated screencast of the publishing company demo in android-view. You can see that a lot of IME functionality works, including swiping, moving the cursor by rolling the area bar, and deleting in semantic chunks. Not shown in the video below, but construction regions (needed for CJK) additionally work, and there's essential accessibility through AccessKit.

Text layout and accessibility infrastructure is basically solved

One of the big unsolved problems as of the 2022 blog article was content layout. It is of way a difficult issue to get right. I’m pleased to say that the ecosystem now has a fine solution, in the form of Parley. It’s gotten there hence of sustained funding from Google, Canva, and Dioxus (now Cognition), as fine as contributions from the community. It seems to be used in the bulk of new Rust UI toolkits. In addition, to assistance mitigate the hazard of monoculture, Cosmic Text is a viable alternative.

AccessKit was fair getting started in 2022, but is now firm infrastructure as well, and used by most UI toolkits. I should note, though, there is a difference between a good integration and a box ticking exercise. And there is additional activity to be done, for example to create affluent content editing completely accessible. One another issue I'd akin to see addressed is achievement degradation whenever accessibility is enabled. This is a issue for egui in particular, as it has to build and diff a tree all animation frame, undercutting the benefits of its underlying contiguous manner design.

System compositor is motionless unsolved

One topic I talked concerning extensively in the 2022 blog article is leveraging the scheme compositor. This matter is equal additional pressing today, particularly alongside the risen importance of video. You really desire a video playing in a hardware accelerated tier whenever possible, and on low end devices it’s the lone anticipation for getting gentle example rates.

There has been several progress, notably the subduction library, but it certainly isn’t commonly unified into UI toolkits yet. To do it fine is a challenging problem, as the capabilities provided by the phase change widely. Ideally there’s a affluent and elevated flat interface, item akin CALayer on Apple platforms, and polyfills to execute that interface as fine as imaginable on another platforms. On Android, whenever the project is item simple, akin overlaying several GUI controls on a video, it would use SurfaceFlinger layers, but whenever it involves additional advanced compositing, it would run shaders on the GPU.

This is entirely item we should build, ideally as a elevated norm community project fairly than item alongside dozens of vibe-coded forks. But equal in the second case it’s improved for it to be than not.

One of the challenges of the Rust UI ecosystem is that distinct applications have distinct needs. The idea of a single, unified UI for entirely broad intent use may be rearward us, particularly now that LLMs can optimize and fine tune for particular use cases.

That’s been playing out architecturally in the choice between contiguous manner and retained mode. Immediate manner is extremely appealing since it’s small total code and seems fairly a bit simpler. And for several applications (most particularly betterment assistance for games) it plant well. However, I am concerned it won’t measure particularly well. In short, it’s fine at the archetypal 90%, but it makes the second 90% harder. To be considered really production-ready, it has to established stable widget identities to build and update the accessibility tree, and it has to reliably cache costly intermediate artifacts specified as content layouts (simple contiguous manner frequently gets about this by cutting corners in content layout, which may be fine for gamedev). And of course, it pulls powerfully towards a example of re-rendering everything all example fairly than exploiting layers in the compositor.

For this logic among others, I am not impressed by the choice of the ArtCraft projects to use egui. I do think egui is a really fine implementation of the contiguous manner paradigm in Rust, and it does resolve a figure of problems (including accessibility, item mainline Iced does not yet support), but it wouldn’t be my archetypal choice for efficiency and scheme applications. The egui README is fairly honest on the advantages and disadvantages, and is value consulting.

Clearly defined modules

One theme that’s emerging from trying to do LLM-assisted application engineering well is having plainly scoped modules, ideally alongside firm details of what the component does. Within a module, stated apparent objectives specified as achievement and robustness against adverse inputs, an LLM can do extremely well.

This doctrine is in strain alongside what has historically worked well. People fairly choose a UI toolkit according to how fine it looks. In particular, Apple UI frameworks have an huge amount of scheme cognition baked in, particularly in the defaults. With extremely small effort, it’s imaginable for a developer to create an app that looks and feels akin a Mac app, equal if not extremely polished.

I think in the forthcoming we have to be moving toward a separation of design and execution. Both are difficult problems, but extremely different. I’m particularly enthusiastic concerning how much area there is to enhance the implementation flank whenever really optimizing. As discussed in the 2022 blog post, the device discipline center of a UI toolkit is an incremental computation engine.

Having a fine spec at the interface between scheme and implementation is critically important. As a broad strategy, I propose adapting web standards, but not following them slavishly. Web standards are an notable and crucial artifact. A huge amount of period and energy has gone into producing them, and there’s additionally a lot of attention to making things activity cross-platform. The extended WPT tests are the true magic of the spec, aiding correctness in the multiple elevated norm open origin implementations. All this goes a lengthy way to explaining why Electron is popular.

That said, strictly adhering to web standards has grave downsides. DOM is dilatory and memory-intensive; a lighter importance tree depiction alongside a bulk mutation interface power assist the need of GUI apps better. Full CSS manner resolution and layout is additionally expensive, although CSS is a affluent and mighty way to depict styling. A subset of CSS carefully curated for effectiveness power be useful. I’ve done experiments in implementing selectors as an productive province device that supports incremental evaluation, at the disbursal of fancier CSS features specified as brother or sister selectors.

The Web is additionally lacking a firm way to portray virtualized lists, a center characteristic of all productive UI toolkit. A spec current requires nailing downward the interface alongside the data model, preserving incrementality.

Blitz, as a standardized browser engine, is fine placed to assist as the cornerstone of hybrid approaches borrowing heavily from Web specs, but additionally adapting them to be higher achievement and additional tightly unified alongside phase capabilities. As fair one example, it’s imaginable to commencement alongside Stylo as the CSS selector engine, and afterward substitute it alongside a leaner, additional productive CSS motor if that proves to be practical.

One fine example of separation of concerns into smaller modules is the Xilem/Masonry split. The Xilem reactive tier was designed to be autonomous of the genuine elements it controls, and certainly it has instantiations the two for DOM (which, among another things, is the infrastructure for the squircle interactive demo) and Masonry widgets. Masonry, on the another hand, was designed to be autonomous of the reactive tier and certainly the tongue for the tier complete it.

By contrast, SwiftUI mashes together the low flat widget implementation, the reactivity framework, and the tongue as well; Swift runtime consideration is part of the implementation engine. Obviously SwiftUI has had a lot farther attain than Xilem, but my disagreement today is that we should reconsider assumptions as things are quickly changing.

Optimization opportunities

Given a UI scheme encoded in a certain way – which can be code, data, or a blend of the two in a DSL – an motor has a figure of opportunities to optimize the implementation of that design. Perhaps a lot of this division is gilding the lily, as a straightforward evaluation of the scheme in optimized Rust code volition outperform nearly any shipping GUI. But I’m curious in the limits of what achievement is possible. Can we get silky gentle UI equal on low end Android phones? I think the answer is yes, and the inquiry value exploring.

One helpful maneuver may be separating out the fixed from the energetic parts of the design, and precomputing the fixed parts. That in no way precludes the scheme having energetic parts; it's fair that it may be imaginable to evade the disbursal of a completely energetic implementation.

Another fruitful avenue for optimization is optimizing the use of layers, to be composited either using the scheme compositor or a lightweight GPU-accelerated polyfill. Using layers efficiently can dramatically enhance performance, mostly by avoiding re-rendering of parts of the interface that haven't changed. However, layers have a RAM cost, and using too many layers can really dilatory things down, as allocating new layers has to go through calls to the underlying system. Getting this correct is a tricky optimization problem, and a fine use of either measure or analysis. UI toolkits mostly either use heuristics, which are not continually perfect, or definitive hints (like .drawingGroup() in SwiftUI or RepaintBoundary in Flutter).

For a deeper dive into achievement questions, see A Critique of GPUI. Ideally, there aren't huge achievement differences between UI toolkits, as all low hanging create have to be picked. We anticipate implementations of scheme languages to be fairly comparable in performance, but motionless tolerate broad discrepancies in GUI performance.

Advice

  • Be bold. Now is the time. Rust UI has the possible to provision vastly higher achievement than the position quo.
  • Build on firm foundations.
  • Use well-defined specs whenever available.
  • Find ways to activity fine alongside open source. Work alongside upstream but don’t spam them alongside slop PRs.

Acknowledgements

Thanks to Nico Burns for reviewing an before outline of this post.

Other Article Hacker News
↑
Close Right Ads
Close Left Ads