HN
Today

The state of building user interfaces in Rust

Rust's quest for a robust graphical user interface (GUI) solution continues, with the 'Are we GUI yet?' site cataloging an extensive, if fragmented, ecosystem of frameworks. While many promising projects are emerging, the community actively debates whether web-based approaches still offer the most pragmatic cross-platform path. This aggregation sparks a lively discussion on performance, developer experience, and the elusive 'blessed' Rust GUI.

87
Score
59
Comments
#4
Highest Rank
8h
on Front Page
First Seen
Jun 13, 11:00 AM
Last Seen
Jun 13, 6:00 PM
Rank Over Time
194459101218

The Lowdown

Building user interfaces in Rust presents a unique paradox: the language's low-level control and performance make it theoretically ideal, yet practical GUI development remains a significant challenge. The "Are we GUI yet?" site serves as a comprehensive, albeit uncurated, directory of the many initiatives attempting to bridge this gap, showcasing the vibrant but highly fragmented ecosystem.

  • Rust is well-suited for native APIs, but the widespread demand for cross-platform support often pushes developers towards alternative solutions.
  • There is no clear consensus on the optimal abstractions, leading to a proliferation of diverse approaches and frameworks.
  • Solutions range from bindings to existing frameworks (like Electron, Qt) to pure Rust efforts utilizing graphics APIs (e.g., Webrender as a foundational layer).
  • The site lists dozens of frameworks covering various paradigms, including reactive (Dioxus, Leptos), immediate mode (egui, imgui), native bindings (Cacao, CXX-Qt, WinSafe), and Elm-inspired designs (Iced, Relm4).
  • Hybrid solutions like Tauri and flutter_rust_bridge aim to combine Rust's backend strengths with other UI layers.

The current landscape is characterized by significant innovation but also considerable fragmentation, with numerous frameworks in various stages of maturity and no single, universally adopted solution yet dominating the field.

The Gossip

Fragmented Frameworks Fret

The sheer number of Rust GUI frameworks is noted as both a sign of innovation and a source of fragmentation, complicating choice and hindering collective progress. Some commenters interpret this as a sign that Rust hasn't 'arrived' for GUI, while others see it as a natural stage of growth. A common critique of the 'Are we GUI yet?' site itself was the lack of visual examples or comparisons, making it difficult to assess the actual 'look and feel' of the myriad options.

Choosing Challengers & Cherished Capabilities

Commenters eagerly shared their preferences and critiques for specific Rust GUI frameworks based on their development experiences. egui and GPUI were frequently lauded for their performance and developer-friendly approach, though concerns were raised about egui's pre-1.0 churn and GPUI's tight coupling to the Zed project. Iced was valued for its Elm-like architectural model, while Dioxus and Leptos stood out for their web-like development paradigms adapted to Rust. Qt bindings offered another viable path, although some found Qt itself to be a somewhat dated toolkit.

Web vs. Native: Waging Wars

A significant portion of the discussion revisited the age-old debate of using web technologies (HTML/WASM) for UIs versus pursuing 'native' Rust solutions. Proponents of web UIs underscored their portability, remote accessibility, and ease of deployment, despite acknowledging HTML's inherent imperfections. Conversely, advocates for native Rust GUIs highlighted their superior performance and ability to avoid the 'bloat' associated with Electron, even if it meant navigating a less mature and more fragmented ecosystem. This philosophical divide shapes many development choices.

Peculiar Pain Points & Practical Palliatives

Developers frequently pointed out specific technical challenges encountered when building UIs in Rust. "Brutal" compile times were a recurring complaint, though alleviated by tools like `sccache` and modular project structures. The rapid evolution and 'churn' of underlying dependencies, particularly `winit` and `wgpu`, also caused significant 'upgrade anxiety.' There was also discussion on Rust's suitability for different UI paradigms, with many noting its better compatibility with declarative, Elm-like, or immediate mode UIs compared to traditional imperative object-oriented approaches, due to its strict memory safety model. Accessibility concerns were also raised as a crucial, yet sometimes underdeveloped, aspect.