Remix.run Logo
mootoday a day ago

I recently started to get an interest in writing a GUI with Rust. In particular, a database GUI.

Initially, I thought Tauri with Svelte. Then I learned about gpui (https://www.gpui.rs/) and I'm intrigued.

TIL about iced, which seems to have been around for a while.

Before I embark on building a prototype UI for my app with all three libraries, does anyone have hands-on experience they can share?

chironjit a day ago | parent | next [-]

I've built apps with Iced, Dioxus and PopOS's version of Iced. Here is my opinion:

1) Iced requires you to style everything in their own styling methods. It's not as intuitive as CSS. I found that, coming from using CSS, I struggled to recreate the style to the same high bar I expected from websites using css.

2)LLMs are not as familiar with Iced's styling, and will struggle with helping you plus also dealing with the breaking changes between Iced versions. Same to a lesser extent with Dioxus

3) Dioxus is easier to build by hand and via LLMs since you just use CSS/tailwind CSS. That said, even Dioxus is rough on the edges, you occassionly get some weird bugs, that you just have to deal with

4)PopOS' Iced version is great if you're using it on PopOS specifically but will require you to install a separate style pack on other linux distros to get the styling of the windows to show correctly. It's more mature than the original Iced IMO, though it's opinionated styling(of it's starter boilerplate) may be less to your liking. While I haven't used it in some time, I would consider it an almost independent fork by now

5) Last but most important negative IMO of Iced and Dioxus is their release cadence. Iced 0.14 has now launched more than a year since 0.13. For some the stability is great, but for frameworks that are still maturing with lots of improvements pending, I think it's actually important to have faster release cadences so that you know issues you face are not left hanging for a fix for a year.

Now onto more practical stuff: 1) If you need simple, standalone apps, any one will work. I think this may be true for your app idea

If you need speed of change, multi platform, etc, you will likely end up with Tauri. In that case, you might as well use the front-end framework you like.

2) None of the frameworks give you a pathway to publishing except Tauri. Basically, only Tauri really puts that as part of its guide, and so when you are going to Publish, you will be using Tauri's guide anyway

3) If you need multi-processing, Dioxus is out of your option, or you will end up using Tauri with Dioxus as your front-end

mootoday 21 hours ago | parent | next [-]

Thank you, I appreciate the in-depth opinion! I think Tauri with SvelteKit is going to be my first prototype, likely followed by gpui because I'm impressed by Zed which is built with gpui.

Also, TIL about PopOS, thank you!

chironjit 4 hours ago | parent [-]

Looking forward to trying out your app!

airstrike 20 hours ago | parent | prev [-]

you can use the iced master branch at any time to take advantage of the latest features.

besides, new releases have nothing to do with fixing your specific issues.

and the pop os fork has historically rebased to the latest upstream release so not sure why you think it's independent

Klonoar 13 hours ago | parent [-]

You do not know their specific issues, their wording isn’t stating what you seem to think.

The master branch approach isn’t always ideal and people prefer having actual releases to base their work on. Not having a set release cadence and it more or less being on the whims of the one maintainer doesn’t exactly inspire the same level of trust you get from Dioxus/etc.

chironjit 4 hours ago | parent | next [-]

>The master branch approach isn’t always ideal and people prefer having actual releases to base their work on.

I think this is me. My view is basically like this - if you use a tech you know works, you're only wrangling with your bugs. If you use a tech that is still being worked on, you are wrangling your bugs and the bugs of the tech you're using.

To be fair, I've tried this master branch thing with both Iced and PopOS's Iced fork. One year ago, PopOs's Iced fork was so slow I realised it basically wasn't going to be production ready for non Pop distros anytime soon.

IMO, both suffer from having very slow release cadence but at least dioxus has CSS

airstrike 3 hours ago | parent [-]

I appreciate the thoughtful replies. I struggle to understand why CSS is such a big deal if you're not building for the web. I can make my app as pretty as I'd like using styling that isn't CSS. OK, maybe I miss glow effects, some nicer gradients and 3D transforms, but those are far from showstoppers and still worth giving up for everything else I gain with iced

chironjit 3 hours ago | parent [-]

I don't have an eye for styling. That said, I have hundreds of hours of experience using CSS and frameworks such as tailwindCSS.

Of course, if I am being honest, the real reason is that there is so much CSS code out there, I can really find anything I need. And so can the LLMs.

airstrike 3 hours ago | parent [-]

Thanks. I've been meaning to make a shadcn-like library for iced. Would that help?

airstrike 11 hours ago | parent | prev [-]

No issue at all is guaranteed to be fixed by the next release. There's no expectations that the deck of issues gets cleared when a new release is published, so conflating the two topics isn't accurate or helpful.

You'll have to explain why the master branch approach isn't ideal. The only argument I've seen hold up is that the community can pin their own crates around a specific release, so if you rely on a lot of third party crates, you benefit from more frequent releases. Given iced is still pre-1.0, I do not encourage people to rely on a lot of third party crates. Most of them also have permissive MIT licenses so you can always bring any one-off bit of code into your own crate and maintain attribution. I did that with the split widget from iced_aw, which was available in 0.12 and dropped by those maintainers when 0.13 came around. I've since made several tweaks to it to fit my specific use cases, so all in all I'm just better off vendoring it myself.

In fact, you also have no guarantee that third-party crates will (1) continue to update for future releases and (2) evolve their own APIs in the manner that you prefer. So if you're worried about being up-to-date and/or stability, again bringing the code into your crates is again the better choice—at the obvious cost of having to maintain it yourself, but such is the nature of software.

I do not know what you mean by "inspire the same level of trust". Or I think I do, but I do not think it's helpful language or an accurate framing. Are you a part of the iced community? I can't speak for everyone, but ISTM that most everyone trusts hecrj implicitly—and we all understand iced is a labor of love, not commercial and the fact that it is subject to his whims actually helps guide a specific vision forward, however long that may take. The ride has been great so far. The Pop!_OS team seems to agree.

Finally, about Dioxus specifically, I'll leave this informative video here https://www.youtube.com/watch?v=dKvFFf04clU

chironjit 4 hours ago | parent [-]

I watched this video when it first came out. Honestly, the video is right in what it was trying to say. That said, that video didn't change my mind on whether to build on Dioxus and it should not for someone either.

The choice of framework should not be dependent on who else is building on that framework. Ideally the factors that matter: 1) Why are you building a GUI app on rust? 2) Target platform/OS support? 3) Are you ok with custom styling methods? Would you prefer to use CSS? 4) Need for multi threading? 5) Publishing / bundling / signing app

I think the reason Dioxus cadence release is slow is that they realised so many things are missing with the rust gui ecosystem that they decided they needed to fix these while building the main product. Guess what, this basically slows down your main product cadence. Does rust need a sub second hot reloader? Yes. Does rust need a native html/CSS renderer? Also probably yes. Did the Dioxus team have to take it on given their size and all the things pending in building rust with html + css? Armchair observer me thinks not.

*Note that I am currently building an app with Dioxus, so I'm putting out my honest opinion, and not saying that you shouldn't use it.*

jenadine a day ago | parent | prev | next [-]

There is also Slint, if you want another option. https://slint.dev

airstrike a day ago | parent | prev [-]

i'm building "Cursor for business users" with spreadsheets and documents in lieu of a code editor.

I'm 90kloc in and couldn't be happier

I encourage you to join the Discord and look around