6 ms·
Ask HN: If Dart can do it, then why can't Rust?
I am reading through Dart and Flutter tutorials. And I was wondering, if Dart can be used for developing multiplatform UI, then why can't Rust be used to develop multiplatform UI? What are the challenges?
- smoldesu 4y agoBoth work fine for either use case. As someone who has written multiplatform UIs in Rust though, I would probably tell most people to use Dart and Flutter.
- crispinb 4y agoCould you expand on why, and what you used? I'm looking into a multiplatform app myself, and I've considered egui and iced, but am leaning towards Tauri. I'll definitely be sticking with Rust (this is a front end for a Rust library that I currently use from a cli). But still interested to hear more on Flutter's advantages in general.
- JediPig 4y agoThis question is easily answered if the OP would attempt to UI in rust. Rust isnt there, nor will it ever be. Swift is there cause Apple focus on generating SwiftUI.
- mikece 4y agoThere's probably no reason it canont be done; the fact that Dart is doing it is because some language was needed for Flutter and the Flutter team chose Dart. In other words: cross-platform UI was the point, not starting with a language and then strapping a cross-platform UI to it (looking at you, Xamarin/MAUI...).
- wmf 4y agoThere's a lot of work going on in this area. https://raphlinus.github.io/rust/gui/2022/07/15/next-dozen-guis.html https://raphlinus.github.io/rust/gui/2022/07/15/next-dozen-g...
- thesuperbigfrog 4y agoHere is my favorite Rust GUI library: https://github.com/emilk/egui https://github.com/emilk/egui There are many other nice Rust GUI libraries depending on your needs: https://www.areweguiyet.com/ https://www.areweguiyet.com/
- crispinb 4y agoAs others have written, it can. Dart/Flutter is clearly further along. The main non-technical reason for this is that Flutter is the single blessed UI toolkit for Dart, whereas Rust instead relies on the creative chaos of multiple competing and/or overlapping open source projects. The Dart approach concentrates effort and removes the burdens of choice and intergration from app developers; the Rust approach has more potential for arriving at novel solutions, and is less likely to get trapped by top-down decisions. It's all pretty promising, and great to have some alternatives to the rather creaky old toolkits we have. I personally think web tech will continue to be a strong contender or many multiplatform apps (for which - Rust has Tauri).
- not_me_ever 4y agoI keep hearing this myth from a lot of people who never used Rust. The truth? It is not true. We (my last team) have been developing cross platform, production ready, multiplatform tools, WITH UI for at least 2 years now; And that was 3 months after starting to use Rust.
- _448 4y ago> We (my last team) have been developing cross platform, production ready, multiplatform tools, WITH UI for at least 2 years now; Please could you share details on what UI library/framework you are using? And what all platforms your UI is targeting?
- alexvoda 4y agoFirst of all, Rust can be used to develop multiplatform UI. The difference between Dart and Rust is that Dart is developed solely (or mostly) by Google and therefore Flutter is the one true way to do UI. With Rust, you have many options none of which are the obvious choice.