Ask HN: If Dart can do it, then why can't Rust?

6 points by _448 ↗ HN
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?

10 comments

[ 5.5 ms ] story [ 34.9 ms ] thread
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...).
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.
Could 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.

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).

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.

> 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?

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.

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.