r/rust • • 8h ago

🙋 seeking help & advice Which GUI crate would you choose for this project?

Hi everyone! I asked this earlier in the week, but I don't think I explained my question very well (sorry for the translation; I'm a Spanish speaker).

I want to learn how to develop graphical user interfaces (GUIs).

I'm generally new to programming, but I really like Rust; I don't know any other languages—just Rust.

I want to build a project for the company I work for. We mostly use Excel for our data; our "database" (an Excel file) is 500k rows by 25 columns (though there are several files covering different areas, so the total exceeds a million data points).

I want to automate this. That million data points is spread across years; the most critical process involves each of us reviewing 100 items in 30/40 minutes—classifying, validating, sorting, etc.

I need to create something like dashboards featuring:

charts and tables that are sortable and filterable.

These two components are absolutely critical.

For the rest, I'm thinking of a data grid (something like Excel, but not a full spreadsheet—just small tables with editable cells).

We need this because our values ​​aren't always 100% accurate; there's a lot of human error involved in our work.

For example: Our system registers a client who has a discount percentage, but that wasn't included in the initial registration request. So, the discount doesn't apply the first time. Later, we receive the correction, and the discount applies to the second sale—at which point we also correct the first sale.

This happens across all areas, so I need something editable. Given our limited review time, I need the interface to be fast and intuitive.

I don't need mobile support—though it would be a nice-to-have, it's not essential. I need a recommendation focused 100% on desktop.

It also needs to properly support Windows, Mac, and Linux.

Which GUI crate would you choose? (I know it's difficult for me, but I want to learn a lot)

0 Upvotes

39 comments sorted by

7

u/ArtemTsitronov 8h ago

Egui perhaps? Pretty simple to use and probably has what you need

3

u/AugieBit 8h ago

I forgot to mention this—I'd like it to have a decent UI; can egui produce a nice-looking UI?

0

u/Sermuns 8h ago

Yes.

2

u/andy5995 8h ago

Anyone know how iced is coming along? I only experimented with it briefly a few years ago.

2

u/AugieBit 8h ago

I'd like to know the same thing; Iced is the only one I've tried and I liked it, but I don't know if it's a good option for my project.

1

u/DrShocker 8h ago

What's the simplest thing you could make to benchmark whether it meets your needs or not?

2

u/AugieBit 8h ago

I didn't quite catch everything, but the most complex parts I need are the table and the charts; the rest is standard stuff—forms, sidebars, tabs, buttons, etc.

As for Iced, I did try doing that—simulating sidebars, tabs, and buttons—and I managed it, though the components were far from polished.

The things I couldn't pull off were the tables and charts, though.

It's a total skill issue—like I said, I'm just learning—but it feels like a waste of time to build components from scratch when I could just use something that's already ready-made.

That’s why I’m looking for alternatives, though if I *do* have to build them myself, I’m willing to learn.

2

u/vancha113 8h ago

Given that you want tables, iced seems to have those built in now. And for tabs, you could use the iced_aw or maybe even something like libcosmic if you want more widgets. It sounds like it can come pretty close to what you need :)

1

u/CrasseMaximum 6h ago

For charts you can use the canvas this is what is used by Kraken Desktop if you want to see it in action.

2

u/yuriks 6h ago edited 5h ago

Last time I tried it (shortly after 0.14.0 released) it seemed to have very poor keyboard support:

  • No keyboard focus or keyboard interactions for most widgets. Tabbing between text fields apparently can be implemented but must be done manually.
  • Text edit fields didn't behave like native/standard controls I'd expect, many shortcuts didn't work.
  • IME support seemed buggy, with IME editing UIs appearing in wrong places or not reflecting typed text.

That left me with the opinion that I'd definitely not use it for a data-entry heavy application. A shame because the event interaction model intrigued me and I was hoping to see how it'd fare on a full application.

Egui, although not perfect, fares much better there. It also has much better and more complete documentation. My main issues with it are:

  • Layout code can be somewhat annoying to write. Having to manually calculate space to reserve for widgets being added later, etc. Nothing insurmountable but it made designing UIs laborious if I had a specific idea in mind of what I wanted the layout to look like and it didn't fit the default model of widgets incrementally and sequentially allocating space in containers.
  • Some parts of the event/interaction model are somewhat limiting. There is no "bubbling" of events, so every container needs to declare ahead of time what events it will capture, which becomes a problem for things like viewports supporting panning with the mouse but with context-dependent actions that take precedence.

I also tried Slint and although compile times were a bit long, I enjoyed the experience of designing GUIs using their DSL. However, the limited amount of built-in widgets eventually made me pick egui for my project.

1

u/rafaelement 8h ago

Pretty fun

4

u/edfloreshz 8h ago

Does this really have to be a desktop app? Dashboard and metric apps usually live in the browser, it makes it easier to share reports, etc.

You’re probably better off just writing the backend in Rust and using a JS web framework for the presentation layer. Afterwards, if it’s really necessary to bring this into the desktop, you might benefit from Tauri.

If you’re dead set on this being desktop, then Dioxus or Slint might be your best bet.

Suerte!

-1

u/AugieBit 8h ago

Yes, it needs to be as local as possible, since the data is sensitive and I do not want to expose it to the network.

1

u/bodiam 6h ago

I'm pretty sure the data is already on the network, how else would you access it? 

-1

u/AugieBit 6h ago

We download the raw data from a corporate VM and email it to our own machine; this isn't a "new system," but rather a local tool for processing that raw data so we can subsequently share it—not via the original system, but as "visually appealing and easy-to-understand" information using images, PDFs, and the like.

1

u/luluhouse7 2h ago edited 2h ago

> Yes, it needs to be as local as possible, since the data is sensitive and I do not want to expose it to the network.

> We download the raw data from a corporate VM and email it to our own machine

WAT. There are so many red flags here. You don’t have a Rust problem, you have a data security/governance problem.

First of all, if the data is so sensitive, WHY TF are you guys yeeting it via email. Email leaves all sorts of extra data lying around like copies in mailboxes/sent boxes, backups, deleted emails, and not to mention is easily fucked up: “whoops was that a typo in the recipient?”Whereas if you use encrypted intranet storage or corporate cloud or (ideally) remote directly into the VM, you have exact knowledge and control over the data and where it goes.

Second, what the commenter was suggesting about a web app has nothing to do with network access. You can absolutely run a webapp from localhost, potentially from within the VM itself, which could be significantly more secure than the setup you describe.

For the record: we have mandatory annual security training at my job and what you just described (sending sensitive data via email instead of operating on it in place or using corporate sanctioned storage) was literally given as one of the many examples of what NOT to do


0

u/edfloreshz 7h ago

You should implement authentication either way, sure having a local binary makes it less likely to expose the data, but not impossible. Given this, Tauri can definitely give you best of both worlds. Rust + JS in a local binary.

3

u/wunderbarposter 8h ago

I don't know for sure it meets all of your requirements so do check - but relm4 makes gtk4 somewhat nice to use, and gtk is a fairly complete toolkit so that might be one to look at.

1

u/AugieBit 8h ago

I had never set out to use GTK; I'll take a look at it.

3

u/jhaand 8h ago

I would go for a web based solution and use one of the more fancy backends like Arctix and Axum and a local database. Use HTMX and webassembly to visualise the data for the users.

The numbers aren't that big.

1

u/Excession638 8h ago

I agree. Especially with the need for multiple users collaborating, which is going to want a server anyway. The added requirement of charts and graphs is also easy to meet on the web with JS libraries.

1

u/joshuaclayton 4h ago

Yes, came to say this. If it's engineers that are comfortable installing the app, spinning up a local web server would be easy.

calamine for xlsx processing, maybe sqlite + seaorm, and AG Grid + a JS charting lib

2

u/don_searchcraft 8h ago

Have you looked at GPUI? It's made by the Zed folks and it's what they use internally for Zed. https://gpui.rs/ its nice, it renders native components underneath instead of being a webview wrapper like Tauri.

1

u/AugieBit 8h ago

Yeah, and I checked out gpui-kit.

I really like its components, but the syntax scared me off—I found it pretty confusing :,(.

But otherwise, yeah, it looks really good.

1

u/edfloreshz 8h ago

Yeah, building UIs with GPUI is not as nice as I expected.

1

u/AugieBit 8h ago

I’d honestly prefer Iced or Slint.

Iced is the only one I’ve learned a bit of so far, and I like it.

Slint is what I had started learning; it looks simpler and has good separation, but it suffers from the same issue—no graphics—even though the board sounds good.

I don’t know how hard it is to create a graphic in one versus the other; I think that’s pretty much the final question that will help me decide between the two.

0

u/edfloreshz 8h ago

As mentioned in my other comment, you’re probably better off letting JS handle the presentation layer, Rust is definitely capable but you’ll be inevitably limited by the ecosystem’s maturity, JS doesn’t suffer from this problem.

2

u/ron3090 7h ago

Is Rust really the right choice for this? If your data lives in Excel, and you want an Excel-like UI, why not make a dashboard in Excel?

2

u/AugieBit 7h ago

I hope I’ve explained myself clearly.

What I need isn't a dashboard to display processed data.

I need an app to process the raw data.

We currently perform a lot of manual processing in Excel on information coming from another system (one we don't control—it's completely private and closed).

It provides system info, IDs, customer IDs, sales IDs, dates, times, etc. (resulting in many unnecessary columns and repetitive, time-consuming tasks).

In another module, we don't even get an ID; instead, we get a different, variable value. However, it links to the first module and is the only way we can connect the customer data (this is where I'd need an SQL join).

And yes, after the data is automated and processed, we *would* use a dashboard to display it. But thinking about it now... the app is for us to use, not the end user; I had planned to just send screenshots of the charts... You’ve given me an idea! Thanks a lot—I think this simplifies my decision. However, I'm still wondering about the table view for quickly editing the data.

As for my idea: maybe generate an SVG chart, a PDF, or something like that—I'm not sure yet.

1

u/rafaelement 8h ago

For this, I would probably try dioxus at first. It'd give you plenty of things for free, including keyboard shortcuts/navigation and relatively efficient rendering of those many data points. Or, iced.

1

u/AugieBit 8h ago

Dioxus me llamĂł la atenciĂłn nomĂĄs por la forma en que estĂĄn implementando el render nativo, pero ahorita, pues no tanto.

En cuanto a Iced, es el Ășnico que de verdad probĂ© y con el que construĂ­ algo, pero no encontrĂ© ninguna grĂĄfica o tabla avanzada :(

Even so, I loved it; I really like iced :)

1

u/Excession638 8h ago

Advanced charts and graphs is a bigger requirement than you might expect. Good graph libraries are rare, and most of them are for JavaScript.

1

u/AugieBit 8h ago

That’s exactly the problem, lol; otherwise, I’d go straight for Tauri, but I hate everything related to JS.

1

u/guywithknife 8h ago

I was reluctant to try GPUI because it’s badly documented and bot really maintained or supported other than for Zed’s internal use.

However, I’ve been trying out GPUI-Kit lately and it’s pretty nice.

1

u/mamcx 7h ago

I working on a new version for my ERP and found

https://www.ironcalc.com/index.html

1

u/DavidXkL 6h ago

For me it's either Iced or gpui-kit at this point.

Especially if you prefer pure Rust

1

u/fschutt_ 5h ago

Do you mean something like this ListView or rather like this infinite grid? I can only just barely recommend my own framework Azul, but it's just about "barely" working (since like two weeks ago).

There are a lot of fixes coming in the next few days, more widgets, etc. But you can at least make it work in a decent amount of time, if you can get the hello world to run, it does scale to relatively complex UIs: https://imgur.com/a/C7zkP9N - https://imgur.com/1IavBvS - stuff like this. The widget APIs aren't yet very good, my main concern was that all the layout engine bugs get ironed out.

Charts support exists via external crates, Azul can render SVG (well, SVG -> Dom, technically, so you just have a regular Dom node with a clipping path). The plotters crate can output SVG and you can then do the styling yourself then?

I'm generally new to programming, but I really like Rust; I don't know any other languages—just Rust.

I highly recommend just using Python instead of Rust for this if you're new, its easier to set up. For data entry, the languages performance doesn't matter so much as the library support, Python has many more libraries than Rust. There are examples with installation instructions on the site.

1

u/Ok-Reason3715 5h ago

Tauri is the right call here. Webview wrappers get hate but they just work for dashboards. GPUI is rough around the edges and the docs are a mess

1

u/ZiggyByte_ 1h ago edited 1h ago

u/AugieBit podre escribir español para que me entiendas mejor por que las traduccione son malas, asi que:

Yo he probado profundamente Egui, Iced y Tauri y la verdad:

Egui es facil y rapido de construir algo, pero Egui simpre va a 60fps, eso quiere decir que toda la interfaz se recarga 60 veces en un segundo, para algo estatico como el texto eso es muy inecesario y solo gasta recursos y es dificil de tratar de detenerlo todo el tiempo.

Tauri podria parecer facil y rapido, pero usa webview, uso inecesario de recursos, fue creado para los desarrolladores web que querian seguir usando typescript en un software de escritorio, pero son muy deficientes y no es tan facil optimizar un programa hecho con Tauri.

GPUI que es con lo que estan todos construyendo como locos ahora, ni si quiera es la version oficial que usa Zed, es una version algo vieja y comunitaria y con una documentaciĂłn horrible.

Iced me gusto al inicio y gasta menos recursos que egui, pero al final tuve que luchar muchas veces contra Iced por que tambien es restrictivo, muchos widgets sencillos no los incluye, por ejemplo, un boton con icono lo debes hacer tu y tienes que pelear contra Iced por que es restrictivo hasta para hacer eso y tienes que construir casi todo tu mismo y eso es dedicar mas tiempo, crear mas mucho mas codigo, mas tardado y al final pasas el tiempo peleando mas contra Iced en lugar de ser un framework que te ayude y facilite construir una interfaz.

Para tu caso necesitas una interfaz nativa y rapida, ya que estaras cargando y usando mas de 1 millon de filas, eso por si solo ocupa ocupa muchos recursos de computo, asi que debes usar una interfaz nativa en rust, ligera y rapida de construir, para que tu mayor esfuerzo sea crear y optimizar el nucleo de tu app para que pueda manejar esa gran cantidad de datos rapidamente y de forma eficiente sin que se trabe tu programa o pc, asi que mi recomendacion es que uses Teksilo .

Yo tambien estoy usando Teksilo ahora, es nativo en Rust ligero y rapido, la interfaz tiene mas de 100 widgets ya hechos y listos para usar e incluye dos widgets que requieres y necesitaras que son las Graficas (con diferentes tipos de graficas) y las Tablas listas para usar, ademas las tablas ya estan virtualizadas por defecto y eso hace que mejore mucho el rendimiento cuando cargues una tabla con 1 millon de filas, lo sentiras muy rapido y agradeceras que este implementada esa funcion por defecto, y tambien tiene ya una linea de diseño propia muy completa que puedes seguir y que en verdad es muy hermosa y moderna (no la interfaz "moderna" que solo es tener modo oscuro), asi que disfrutaras mucho en desarrollar tu programa con Teksilo y no estaras peleando con un framework todo el tiempo, ademas esta super bien documentado todo, asi que yo te lo recomiendo sobre todos los demas.

https://www.teksilo.rs/