r/rust • u/AugieBit • 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)
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
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
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.
7
u/ArtemTsitronov 8h ago
Egui perhaps? Pretty simple to use and probably has what you need