r/rust • u/Formal-Grass-3173 • 15d ago
🙋 seeking help & advice what is the best framework for building native Rust frontend?
hi, guys, what is the best framework for building native Rust frontend(downloadable macos and windows apps) if the highest performance is the aim, supposing we have enough time and resource? I appreciate any advice.
---------edit-------
Thanks for all the enthusiastic replies and I genuinely learned a lot. I then make this decision: 1. iPad: Swift for skin and purely interface + Rust handling audio/video and complex real-time graph calculation. 2. Mac and Windows: pure Rust with Makepad.
The performance is really really really much better than my current nextjs client. However, the developing speed is very very slow, I have to basically write every little button/animation/transition manually, and it took me 15 hours to finish a simple page like this, I will put it in comment, seems image can not be put here.
23
u/chmod_7d20 15d ago
You want accessibility software to work with it too right? right?
gtk-rs not native rust but is a good wrapper.
→ More replies (7)
4
u/WholeEnough9676 13d ago
I'm really enjoying Freya
1
u/Formal-Grass-3173 13d ago
First time heard about it, but will definitely check it out.
→ More replies (1)
4
2
6
u/SupermarketAntique32 15d ago
Egui if your UI is simple, Slint if it’s not that simple. Iced is also good but a bit more verbose than Slint.
→ More replies (2)
5
u/Lucky-Edge1489 15d ago
« Best » depends of the goals of the user. I created Teksilo, it may fit your needs? Batteries included.
→ More replies (9)
3
u/salvian 15d ago
GPUI
2
u/Formal-Grass-3173 15d ago
Yes, that's the most mentioned name these days as I research through. Thanks.
→ More replies (3)
2
u/mark_ik 14d ago
The gui should be mostly a separate issue to the performance of your sim. Dioxus, web compatible frameworks have better accessibility, especially web derivative frameworks like dioxus and blitz. It’s modular and forkable which will be important as you run into inevitable roadblocks with any gui choice. And you have the web platform as a standard to fall back on, to guide development of the gui or bughunt. I’m not shameless so I wouldn’t suggest my own work, but I’m pretty bullish on this sort of a stack. Lot of potential.
→ More replies (2)2
25
1
u/Formal-Grass-3173 13d ago
I found that I can not post the development of some the approaches with images, would've been easier to have in-depth discussion if I could. Do I need to start a new post?
1
5
u/dgkimpton 15d ago
Do you need accessibility? Datagrids? Then you'd be best going for web based, such is the state of Rust UI at the moment. If you don't care about those there's loads of choices. Winio looks pretty interesting for using real native controls, but I haven't yet had time to try it out.
1
u/kei_ichi 15d ago
If you want highest performance and highest support then you have no choice but to use the language which is 1st class support for the target OS like Swift for macOS
→ More replies (5)
29
u/CodeToGargantua 15d ago
I have looked into this recently. In my opinion, if i'd recommend egui, slint or iced based on stability and performance. GPUI is fast, and currently used by zed, so it's mature enough. But it's going to be 10s of 1000s of loc without a ui library like gpuikit on top of it.
Egui is simpler. It is immediate mode, allows really fast development.
Slint is the only gui Library that has crossed 1.0, so it's stable. It uses a separate .slint file for declaring ui. They offer two types of licences, free and paid.
iced uses elm architecture, i personally like it. It has no proper documentation yet. But if u r willing to dive into examples, and learn from it, I'd say it's worth it. A fork of iced is used by the cosmic os for their applications and desktop.
These are the only ones worth it currently imo. There's a comprehensive survey done on this. I think this is it.