HACKER Q&A
📣 _448

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?


  👤 crispinb Accepted Answer ✓
As 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).


👤 JediPig
This 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.

👤 not_me_ever
I 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.


👤 mikece
There'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...).

👤 thesuperbigfrog
Here is my favorite Rust GUI library: https://github.com/emilk/egui

There are many other nice Rust GUI libraries depending on your needs:

https://www.areweguiyet.com/


👤 wmf
There's a lot of work going on in this area. https://raphlinus.github.io/rust/gui/2022/07/15/next-dozen-g...

👤 alexvoda
First 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.


👤 smoldesu
Both 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.