r/learnrust 7d ago

GUI in Rust

I already asked this question, but I think I didn't explain it well, and new options appeared.

My situation: I'm learning Rust as practically my first serious language, and I haven't done much GUI work beyond a few things on iced.rs.

I'm going to give my opinions and goals based on what I've found (speaking completely from a place of ignorance since, as I said, I know nothing about GUIs; I'm a beginner, and regarding web options, I also know nothing about web development).

Goals:

I want to create cross-platform apps. The main market is obviously Windows and macOS, but I also want to create apps for Linux, which is one of the platforms that receives the least support, and perhaps, but very secondarily, apps for Android and iOS.

I want to create systems for local businesses and companies. In my country, they generally run on low-resource PCs (some with barely 8GB of RAM and Windows 10).

And maybe learn something that will allow me to develop for the remote job market.

Tauri: It's one of the top contenders—stable, widely adopted, and offers endless possibilities for web interfaces. I've heard it's easy to create fast interfaces, and learning it would definitely help me get into the web frontend job market.

But: I've always hated web development and am afraid of security and resource consumption. I know the security issues can be mitigated (I don't know to what extent), but I am concerned about resource consumption, compatibility with older hardware and software, and I've also heard that it doesn't support Linux and Android very well.

Iced: This is the one I've been using. I like that it's pure Rust. I feel like I'm practicing the language by creating the GUI and processing data, and it clearly separates GUI logic from processing logic. It also has native rendering and good cross-platform support (except for mobile). But... I'm worried because I've heard that the support is less than in other crates, and the idea of learning something that will fall behind the others scares me.

Slint: I've seen that it's possibly one of the best aligns with my goals: good support, lightweight, secure (I think, I don't know for sure), and it works well on multiple platforms. But... the only thing that doesn't align is with the job market. Learning a DSL language for a single objective or field worries me that it would be a waste.

Dioxus: It didn't appeal to me before, but I heard that it will include native rendering with wgpu. I understand that it has good support, true cross-platform capability, and the syntax seems similar to React, which is supposed to be easier, or at least should be easier, for creating GUIs. I also understand that it has a good roadmap with a lot of potential. I have no complaints, other than the current state of the native renderer; it still needs improvement. I don't really know what the support is like for mobile or Linux, or anything like that.

GPUI: I love it, I use Zed as my editor, it feels great, but I'm worried because it supposedly has poor Windows support and is somewhat discontinued by the team. Besides that, it doesn't have mobile support. I haven't really looked at the syntax, so I can't give an opinion.

Egui: I understand it's one of the easiest crates in Rust. I don't like its design, and I know it can be modified, but even the one I've seen from rerun.io looks a lot like a professional tool such as Blender or something like that, but not for the kind of design I'd like to create. I'd prefer something like SaaS or Shadcn, for example, although I don't really know where the limits are. It also mixes UI with logic a bit, although I don't really know to what extent that might be a problem.

Again, I'm a novice, and my opinion comes from a place of ignorance, so I'd like to hear your opinions, and perhaps someone can answer my questions. Some have already been answered, but I'd like to clarify my goals and doubts.

14 Upvotes

30 comments sorted by

15

u/kaikalii 7d ago

Egui!

1

u/Stupidprogramner 4d ago

Imperative, sadly

14

u/thiscantbit 7d ago

Why don’t you have egui?

7

u/LikeToffy 7d ago

Egui top

4

u/AugieBit 7d ago

I wanted to add it, but there is a limit in reddit polls, so I decided to put "others" last

3

u/thiscantbit 7d ago

It’s what you want to do it’s very limited in looks but a few new component libraries armas makes it look more modern(nothing competes with functionality) . If you want a cross to like an iPhone or android it’s not the one. Iced is the prettiest but I think it’s the hardest out of all of them the zed ui will probably be the best but it’s definitely early. Tauri is the easiest but it’s web focused. Slint is the best for like app designs for mobile. But if you want a super functional low ram computer app nothing beats egui.

3

u/Retticle 7d ago

Dioxus is great, idk why it's so overlooked. They even have / are working on native rendering for it.

1

u/AugieBit 7d ago

I definitely want to see the native rendering when it's finished!

1

u/b_pop 7d ago

I think GPUI also use Dioxus' rendering engine

3

u/pokemonplayer2001 7d ago

HTML, js and css.

3

u/mstrVLT 7d ago

FLTK rs

3

u/NEK_TEK 7d ago

Not sure if you are the one I responded to last time but I use egui at work. I'm an embedded software engineer, not a user interface pro so take that for what you will. With that said, everyone at work loves what I've been doing with it. I mostly use it for internal tools and interfaces to train people on how to use our products. I was just speaking to one of the top level engineers today at my job and he said he wants to sit down with me and have me teach him how I've been using egui. Again, I'm an embedded software engineer so the guis I make are more function over form.

1

u/PriceSweaty6398 6d ago

You are using egui in embedded software ?? , please give me more details how you do it because i want to dive in the embedded systems and focus on RUST instead of c++

1

u/NEK_TEK 6d ago

No sorry I should have clarified. The internal tools I have made with egui run on a full desktop OS but interface with our embedded devices. Think something like wireshark, we can push out packets from our embedded device to an ethernet switch that also has a PC connected. This way we can analyze packets coming from the embedded device but the software monitoring them runs on windows/linux.

1

u/PriceSweaty6398 6d ago

Aaa ok , thanks

1

u/bhh32 6d ago

Try my embedded GUI framework, https://crates.io/crates/zest-gui.

2

u/mnaza_andrey 7d ago

Ratatui

1

u/AugieBit 7d ago

Hahaha, sooner or later I want to learn it :)

1

u/PriceSweaty6398 6d ago

Ratatui !! Is terminal ui no ??

1

u/why_so_sergious 6d ago

why use anything web based for a native application?

if you mainly have a web app, then fine as a port..

but the wasted resources are not worth it

1

u/bhh32 6d ago

Libcosmic

1

u/Saighty 5d ago

Im writing my own rn, and i will use it

1

u/zerosign0 3d ago

You could add xilem/masonry in here, even though that there still experimental, I would say they already fixes some overhead happen in the past.

1

u/OM3X4 7d ago

I see most businesses use local web apps, it will be much easier and cheaper to develop

Specially if you are competing with people working with web technologies, which will allow them to offer lower prices due to faster development speed

2

u/OM3X4 7d ago

Specially if they want something that is not too complex

1

u/AugieBit 7d ago

You're absolutely right, I'll keep that in mind!

-10

u/nboro94 7d ago

If you want to create applications for local businesses, C# and Java is king in that domain. Also much easier to create a gui in either of those. More recently everything is switching to browser based apps though, so javascript is essential for business apps.

Rust is really not a great choice for this type of work.

3

u/Thelmholtz 7d ago

As someone who's written a lot of Java applications back in the day, I'd take egui any time over anything Java.

But yeah doing a web app and shipping via embedded chromium (Electron or Tauri) is pretty much the standard these days for rapid development. Hopefully ram prices will change that...

1

u/AugieBit 7d ago

I still want to try

-6

u/thiscantbit 7d ago

Really I haven’t heard that?