Live data from Hacker News

The state of building user interfaces in Rust

areweguiyet.com

71–80 of 156 posts

Re: The state of building user interfaces in Rust

#71
I realize it's not a pure-Rust UI, but building with Tauri has been a joy. I recently built a GUI for one of my side projects and being able to use standard Typescript client-side development approaches, with a locked-down IPC, was surprisingly smooth. Love the "Wails-style" approach to a smaller release size than Electron as well.

It's nice to be able to use existing design systems and components, and to be able to validate in a web browser in quicker build loops before doing the full Tauri builds. I still manually QA across platforms pretty aggressively but Tauri's "cross-platform from day one" really isn't much of a stretch. The project if curious: https://github.com/zecrocks/zkv

Re: The state of building user interfaces in Rust

#73

Which of these has effective accessibility support? I suspect if such a filter was applied there would be very few. Probably just the bindings to gtk, qt or appkit.

I think this article: https://www.boringcactus.com/2025/04/13/2025-survey-of-rust-... was the most exhaustive review of accessibility that I know of.

Re: The state of building user interfaces in Rust

#74
I also have a horse in this race, would love to have it included!

I'm building Hypen (https://hypen.space), a UI framework with a DSL that works in in Rust, TS, Go, Kotlin, Swift, and all over the place, as long as you can use WASM or binaries.

Some cool things about it:

- Renders natively on Desktop, Web (DOM and Canvas), Android and iOS.

- Streaming-first (SSR), so you can stream native apps from the server

- Custom tailwind parser so it supports your favorite shorthands

- Support for streaming apps from CF workers with 5 lines of JS/TS

- You can embed any Hypen app into another Hypen app like its an iframe, with just 1 line of code

- Has a custom "browser" for Hypen apps, both on desktop and on mobile, so you can easily check how your app looks anywhere

- Coming soon - stdlib and WASI interface to enable full WASM portability across platforms

Note: Desktop support is still a bit early and needs more crossplatform testing

I started building this years ago, first manually, now accelerating it with LLM's which are incredible for mindnumbing tasks like writing frameworks like these requires. Its still in an "early alpha" but it's getting closer to maturity and a "stable beta" by the day, hopefully fully stable 1.0 by end of the year.

Re: The state of building user interfaces in Rust

#75

While part of the Windows crate, I think windows-reactor deserves explicit mention. https://github.com/microsoft/windows-rs/tree/master/crates/s... It's a react-style API for WinUI3 apps, meaning it's not trying to mimic the Windows LAF. It's merely a binding.

Docs: https://github.com/microsoft/windows-rs/blob/master/docs/rea...

Re: The state of building user interfaces in Rust

#76
post #11

qmetaobject-rs gives you the best of both worlds: logic in rust, UI in arguably world's best cross platform framework Qt.

As a "batteries included" framework Qt is undoubtably amazing but I used it on a project recently and it struck me as dated compared to Flutter or React Native. Maybe I'm doing it wrong but I had to write a lot of boilerplate C++ even when using QML. The layout engine feels byzantine. The state management is mostly manual. Flutter is a lot more consistent, reactive, and all done in one way (Dart) and it supports hot…

Qt has been going strong for 2+ decades and you can bet will do so for at least that many more. Flutter is by Google and it exists when I started writing this comment but we can't say for sure it will when I'm done writing it

Re: The state of building user interfaces in Rust

#77

I also have a horse in this race, would love to have it included! I'm building Hypen ( https://hypen.space ), a UI framework with a DSL that works in in Rust, TS, Go, Kotlin, Swift, and all over the place, as long as you can use WASM or binaries. Some cool things about it: - Renders natively on Desktop, Web (DOM and Canvas), Android and iOS. - Streaming-first (SSR), so you can stream native apps from the server - Cus…

Just make a PR here: https://github.com/areweguiyet/areweguiyet

(I'm not affiliated, but have made PRs there in the past)

Re: The state of building user interfaces in Rust

#78
When I was a student I had to make quite a few Qt application with C++ (for Linux). However, I bring the food on the table doing web (recently only the backend). During that time, the languages for web were something like Python - concise, convenient in terms of ecosystem and distribution, but bloated in terms of memory consumption. "Hello World in Java almost doesn't hang" he-he. Anyway, my first thought when I found Rust I dreamed to make a GUI application.

Unfortunately, I had the expectation that it should be as simple as making an HTML page. My failure to find a library or a framework to make GUI application made me learn a lot about how GUI works. I realized that making GUI for browser and for desktop are quite different problems. Browser makes easy what's difficult having a desktop oriented GUI framework - text rendering. However, the situation is fair the other around. GUI framework makes easy what's difficult in a browser - drawing arbitrary shapes. As a result, a web-frontend programmer struggles to figure out how to write some text having something like Qt, a GUI programmer tries to find the API to the bitmap in a browser.

It's fair noticed in the previous comments that a GUI framework brings a lot. That's because the problem is complex:

1. Create a window

2. Communicate with the window compositor (you do in WinAPI too btw). How to access the system tray and the child window.

3. Communicate with the operating system.

4. Handle the user input. Callback vs event streams. The user has 4 keyboards for some reason.

5. Rendering. Subpixels, shapes, different DPI. The user has 6 monitors.

6. Text rendering.

7. Widgets. Where probably the most difficult part is to make a textbox, because it involves the solutions of all previous steps.

The steps above touch only the visual part. There's also audio, accessibility, somebody wants the GUI framework to solve the networking.

After all of this research, I picked simply SDL for my project.

1. It's easy to compile.

2. It's small.

3. It relies on the subjectively common dependencies.

4. It's fairly straightforward to upgrade. Given that, you have to create a lot from scratch the part with updating is smaller comparing to a Qt-based solution.

5. It has batteries. My favorite is SDL_ttf which allowed me recently to implement selection of the text which is quite a bit through towards a textbox.

Having a project on SDL requires a lot of knowledge, but not a lot of code.

Re: The state of building user interfaces in Rust

#79

Building a GUI framework in Rust comes with certain challenges. Ralph Levien, author of druid and xilem made some good posts about it. I'll link one here. https://raphlinus.github.io/rust/gui/2022/07/15/next-dozen-g...

Thanks for that link. I just like the idea of creating things with Rust. Having the ability to build things for the web with Rust is a plus

Re: The state of building user interfaces in Rust

#80
post #7
post #5

Earlier quoted context omitted.

Is that actually needed? Styling is largely a user decision. They might have defaults yes, but if you looked at a raw HTML page with no CSS styling, you might come to the conclusion that websites have an ugly GUI...

This is the mindset that gives you Java-Style GUIs.

I love Java-style GUIs though.
Post reply on HN