Live data from Hacker News

The state of building user interfaces in Rust

areweguiyet.com

111–120 of 156 posts

Re: The state of building user interfaces in Rust

#111
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…

I am not much of a GUI user, or programmer, but I have used a lot of GUI tool kits, mostly debugging and/or extending other's work

HTML5 is the sanest for me. I can actually find where code executes, tooling using browsers (Firefox or Chromium) excellent and the declarative layout works well

The hours and hours I spent chasing the executing code in Dart/Flutter and, oh my aching head, in SwiftUI made me hate those with passion

I get that it is unsuitable for desktop programmes, for many good reasons, but it is so much better to modify.

Re: The state of building user interfaces in Rust

#112
I have been building on a Pi with a 7 inch touch screen

I started out looking for lightweight X-Windows solutions, for the LLM and me to use. Cutting a long and frustrating story short I settled on SDL2 Rust wrapper

But what a PITA X-Windows is (e.g. need Wayland for some things, but does not work well for others), and my goal is an appliance, not an app.

So in a moment of insight I spent an afternoon getting SDL2 to draw on the Framebuffer and dispensed with X entirely

I highly recommend this approach. Life is so much easier without X-Windows

Re: The state of building user interfaces in Rust

#113

Rust needs good Qt bindings. None of the existing projects will ever reach Qt. Rust. Cargo. Qt. Go did it with https://github.com/mappu/miqt . Zig did it with https://github.com/rcalixte/libqt6zig . When will Rust do it? The time is now.

Slint is an attempt to build a Qt competitor

Although it's built in Rust, it supports a variety of languages + a custom DSL (like QML).

Re: The state of building user interfaces in Rust

#114
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…

> I can't think of what I'd want a native UI solution for.

So that your software is actually pleasant to use for your users. UIs built on HTML universally suck compared to native UIs.

Re: The state of building user interfaces in Rust

#115
post #85

I tried to find a ELM style framework in Rust. And I couldn't find it in Rust and chose F# Fabulous instead.

Really? Every time I do a search I feel like there are too many TEA frameworks for rust, and I have to figure out which ones to invest time into. afaict iced and xilem are probably the best current options

Re: The state of building user interfaces in Rust

#116
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…

I can't think of what I'd want a native UI solution for.

A proper first-party LLM app for ChatGPT/Claude that doesn’t buckle under the weight of large threads.

Re: The state of building user interfaces in Rust

#117

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…

The issue with tauri is handling big blobs, you either have to serialize them between processes or serve them to the webview via tcp. Albeit dangerous if done wrong, Electron can be configured with direct access to the file system. AFAIK tauri does not have this escape hatch

Re: The state of building user interfaces in Rust

#118
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…

I can't think of what I'd want a native UI solution for. A proper first-party LLM app for ChatGPT/Claude that doesn’t buckle under the weight of large threads.

You can accomplish this with web without much issue.

Re: The state of building user interfaces in Rust

#120
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…

> wgsl-bindgen

Oh I didn't know about this, it looks great! If it works as well as it seems to, that would be a huge ergonomic boost to using wgpu. Currently all my wgpu code has those fragile feeling pipeline layout definitions scattered around and changing the data layout is always a pain.

Post reply on HN