Live data from Hacker News

The state of building user interfaces in Rust

areweguiyet.com

51–60 of 156 posts

Re: The state of building user interfaces in Rust

#51
Tons of great options, for sure, but community efforts and corporate sponsorship ends up fragmented if there isn’t a clear winner.

For desktop app development, if I don’t care about native controls (and what does that mean in Linux or even post-Win32, anyway?) and don’t want to deal with Electron, why not use something a bit more established like Avalonia or Flutter?

Re: The state of building user interfaces in Rust

#53

I’ve been really impressed with GPUI, particularly with Longbridge’s open source component library which provides a bunch of shadcdn-alike widgets that are really well implemented and come with a bunch of tailwind-like helper functions that make layout easy. The downside is that the dependency stack you need to do gui programming with rust is massive and the compile times are brutal. You can’t beat the application pe…

GPUI is truly awesome.

Check out: https://github.com/longbridge/gpui-component

Re: The state of building user interfaces in Rust

#54

i've recently built a very complex healthcare application in dioxus and it's been a tremendous joy to work with. right now it's web-only, but the app does run fine as a desktop app when we need it. having SSR built in means that the UX is amazing - really complex pages load basically instantly, and it degrades just as easily for folks that haven't loaded the WASM. server functions were also fantastic to work with and…

What components were lacking? Is what you've built accessible somewhere?

Re: The state of building user interfaces in Rust

#55

I’m not well-versed in Rust, but as far as I’m aware there’s a somewhat low hard cap on how ergonomic a fully Rust “old style” imperative OO UI framework (like AppKit/UIKit) can be, which is unfortunate as I find that style easiest to work with for complex desktop apps. I wish there were more memory safe compiled languages that focused on ergonomics for cases like this.

What makes you say that exactly?

In my experience declarative UI frameworks quickly get awkward as UI complexity ramps. That model is workable for things like simpler mobile apps, text editors, terminals, and tiny focused utilities but is cumbersome for anything much more involved.

While imperative retain mode frameworks are technically possible in Rust, my understanding is that there’s a level of unavoidable ceremony and syntax ugliness (unless safety is discarded, which defeats the point of using Rust).

Re: The state of building user interfaces in Rust

#56
EGUI slaps. I'm interested in comparing it with GPUI too: That one gets immediate cred for being demonstrated in a responsive program that demonstrates the range of its complexity.

EGUI bonus: Good integration with WGPU, so you can show 3D things as part of your UI.

Complaining time: Historically, syncing winit, EGUI, WGPU, the binder between GPU and EGUI, and EGUI libs like for file dialogs has been a pain. It gives me anxiety thinking about upgrading versions. That said... the teams are sometimes shockingly fast about syncing their UIs. It is when winnit or WGPU etc make big breaking changes (Often from accumulation over time) where things get hairy!

Re: The state of building user interfaces in Rust

#57

I’ve been really impressed with GPUI, particularly with Longbridge’s open source component library which provides a bunch of shadcdn-alike widgets that are really well implemented and come with a bunch of tailwind-like helper functions that make layout easy. The downside is that the dependency stack you need to do gui programming with rust is massive and the compile times are brutal. You can’t beat the application pe…

GPUI is developed alongside Zed and thus features that aren't useful for Zed are sometimes left behind. I think there was a community fork recently that tried to tend to these concerns. It's not a bad thing per se, but its worth mentioning.

Can certainly be a downside. Jaded / grumpy rust programmer perspective: I will take this over the typical rust pattern of OSS libs which have been made without being tested in practical applications!

Re: The state of building user interfaces in Rust

#58
post #31

Throwing in my vote... I've been doing everything with wasm-bindgen/web-sys, i.e. just doing my UIs in html, and for 99% that's what I'd want anyways. Web UIs are portable, remotely accessible, and don't require installation on each client. For the small percent that's left where speed is critical, I've just been using wgpu and wgsl-bindgen directly. I can't think of what I'd want a native UI solution for. And then h…

saving this comment, this echos my own thinking, html is not great but its better than dealing with all those things you listed.

Second this. Html is just so darn universal now

Re: The state of building user interfaces in Rust

#59

my 2 cents: egui is the clear winner for making desktop applications. I've built a complex application recently (think of it like an AI powered image editor, doing plenty of editor logic and communicating with several python backends for the AI part) and it's been smooth sailing. It would be nice to have a family of components that look native on every platform but nowadays the desktop experience is anyway wildly inc…

> egui is the clear winner for making desktop applications I disagree. It's the easiest to get started with, but it looks pretty terrible (poor font rendering especially), and immediate mode has serious downsides. My current favourite is https://github.com/longbridge/gpui-component

egui has recently revamped text rendering, looks much better than it did just a few months ago.
Post reply on HN