Remix.run Logo
Iced 0.14 has been released (Rust GUI library)(github.com)
55 points by airstrike 4 hours ago | 27 comments
lazypenguin 3 hours ago | parent | next [-]

I think the Rust community is sleeping on the potential of iced for traditional desktop gui. I monitor the gui space in Rust closely and have seen many toolkits come and go. In my opinion a desktop gui library/framework needs to solve two things to be useful: architecture and advanced widgets.

egui has served me well and is eagerly recommended in "what gui should I use" threads since it solves the widget problem well in an easy-to-use package. However, any sufficiently advanced application ends up needing a nice architecture to maintain development speed and enjoyment. I've found whether using egui/slint/fltk/etc. you end up having to roll your own system. When you start needing things like undo/redo you suspiciously start architecting something that smells like the elm architecture.

Iced is the only Rust toolkit that I track that solves the architecture part upfront. The message pattern is hugely powerful but it is hard to appreciate until you've really gotten in the weeds on larger applications. Once iced reaches a point where there is an advanced set of widgets available I suspect its popularity will rise accordingly.

As a comparison, one of the most successful desktop gui toolkit of all times (Qt Widgets) solved the architecture/widget duality long ago with the signal/slot system and advanced widgets like treeviews, datagrid, etc. Since then we must have had hundreds of "desktop" toolkits across all languages that can draw buttons and dropdowns but nobody has toppled the king yet for building advanced desktop GUIs (although there were a few close competitors in C# with WPF and Java with Swing they only solved the widget part in my opinion). I like to think iced can take this mantle one day, best of luck to them and congrats on the 0.14 release.

bikelang 33 minutes ago | parent [-]

In case you’re not aware - Pop!_OS has built their cosmic desktop environment on top of iced.

avtar 2 hours ago | parent | prev | next [-]

For anyone curious about accessibility support, looks like it's a WIP with contributions from System76 staff <3 https://github.com/iced-rs/iced/issues/552

And TIL about AccessKit https://github.com/AccessKit/accesskit

mootoday 23 minutes ago | parent | prev | next [-]

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?

airstrike 21 minutes ago | parent [-]

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

dotancohen 3 hours ago | parent | prev | next [-]

I've got a stagnating Python Qt app prototype that I need to actually write properly. It's a personal project so I can do that without affecting users. I need to decide between Rust and Iced or stick with Python and Qt.

Python has a VLC library that embeds VLC behind the scenes for audio playback, and Qt had facility to work with it. This is terrific as I need to support a wide variety of codecs (voice recordings) and I need to change playback speed during playback. Does Rust or Iced have such capability to embed VLC? Not the VLC UI elements, just to use VLC behind the scenes.

thorn132 2 hours ago | parent [-]

This might be what you're looking for: https://docs.rs/vlc-rs/latest/vlc/

There's also PyO3 for using Python libraries from Rust, if no bindings or substitutes are available.

wonklebonkle 3 hours ago | parent | prev | next [-]

Iced is a wonderful dead-simple framework. I hope it forever maintains the simplicity which combines nicely with Rust’s features.

One thing I love about Iced and miss in Qt is writing the software in a single language. Qt has chosen to introduce multiple languages into their framework which makes the entire codebase a huge learning curve. In Qt you write your display layer in QML then your UI logic in Javascript and any backend advanced logic in C++. It is frankly exhausting.

In Iced you write in Rust and use Cargo packages. This gives the developer ultimate composability and clarity of their application as well as powerful tools from an established ecosystem. If Qt wanted to provide a powerful Qml tool, they have to write it and build all of the IDE integration.

For the record Qt used to be moving in a pure C++ direction but that changed when Qml came onto the scene.

rubymamis 2 hours ago | parent | next [-]

I actually love that separation. QML is a great language for writing beautiful, responsive, modern UI with animations easily. C++ is great for performance and logic. I don't like Javascript but I don't need to write a whole lot of it. I wrote my note-taking app's block editor in QML and C++ if some people are curious[1].

[1] https://rubymamistvalove.com/block-editor

mroche an hour ago | parent | next [-]

I gave Notes/Plume a try a year or so ago, it was an interesting experience. I ended up falling back to Joplin as I could use it on macOS, iOS, and Fedora with synchronization via Dropbox.

I've always been curious about productizing apps like these, from a financial/business perspective have you found Daino worthwhile or enough of a success (by your standards) to continue developing it as a proprietary application?

rubymamis an hour ago | parent [-]

Hi! That put a smile on my face (: I'm working now on a mobile version with real-time sync, so maybe give it another try when it comes out.

Not really, not yet. Once my FOSS app was popular I used to earn a livable amount of money from ads on the website. But after a SEO crash that all went down the drain and the money I'm getting now from subscriptions to Daino Notes is nice but not livable. I've been working the last year (at a really awesome place) doing React programming (my first salary job, actually) and at nights and weekends working on Daino.

I actually got many requests to license Daino Notes' block editor. So I've figured there's a business there. I'm working on something I'm calling Daino Qt which is a collection of different components to accelerate Qt apps development (so I'm also its client). It will include my block editor, components for mobile - current Qt components on mobile are extremly shitty - so I'm planning on changing that with things like native-feeling swipeable stack view, native-feeling text editing, etc. And maybe Qt C++ client SDK for InstantDB (and more stuff).

Hope I can sell this as well while also consuming these components for Daino Notes and other apps I will develop.

wonklebonkle 2 hours ago | parent | prev [-]

Did you ever write a pure C++ Qt application with QtWidgets?

rubymamis 2 hours ago | parent [-]

Yes, my FOSS note-taking app[1] used to be pure Qt Widgets. Recently, I've added the Kanban feature that uses QML (this and the editor settings should be the only parts in QML, if I remember correctly).

[1] https://github.com/nuttyartist/notes

ktpsns 3 hours ago | parent | prev | next [-]

Haven't used Qt for a few years, but back then QML, QtQuick, etc have been optional features. You absolutely could write all your Qt logic in C++ only, in a somewhat similar way like the code shown in the iced READMEs. It is the same in any other classic GUI toolkit such as GTK+.

Biggest drawback in qt/c++ used to be the MOC. I guess they still have not gone rid of it, haven't they?

dotancohen 3 hours ago | parent | prev [-]

I write all my Qt in Python. I've never used the C++ bindings. But in Python you don't need to deal with QML or JavaScript.

amelius 2 hours ago | parent | next [-]

I did some Qt programming in Python (PySide6), but ran into segfaults, which should of course not happen no matter what you do in a scripting language (except when using modules like ctypes). Many of these cases were related to object lifetime handling which is difficult to do correctly in Qt, and many people have written about it. In Python (a garbage-collected language) one should not have to worry about this.

wonklebonkle 3 hours ago | parent | prev [-]

Are you writing QtWidgets or QtQuick in Python? My understanding is that QML is mandatory for QtQuick apps.

dotancohen 3 hours ago | parent [-]

I use QtWidgets. I've never touched QtQuick.

k_bx 3 hours ago | parent | prev | next [-]

The COSMIC DE (by System76, default in Pop_OS distro) is written using their iced fork, which hopefully will be upstreamed eventually.

sho_hn 3 hours ago | parent [-]

Why did they fork it?

airstrike 3 hours ago | parent | next [-]

They have needs that are specific to COSMIC, so they maintain a separate fork, but they update their fork to match the latest upstream release.

They also contribute to iced indirectly via cosmic-text and other crates.

nicoburns 3 hours ago | parent | prev | next [-]

I believe it's a soft fork where they're treating Iced as upstream. Having their own fork just means they can land changes quicker.

tomnipotent 3 hours ago | parent | prev [-]

The last iced release was September 2024, more than a year ago. I imagine they had constraints that made it impossible to wait for upstream patches to be merged (if at all) and it was simply more tenable to fork and worry about merging later.

andsoitis 4 hours ago | parent | prev | next [-]

Repo: https://github.com/iced-rs/iced

stackghost 2 hours ago | parent | prev | next [-]

I use Halloy, one of the applications featured in the readme, on the regular. It's great and the UI is very pleasant. I don't enjoy writing rust and very much wish someone would port iced to other languages.

clumsysmurf 32 minutes ago | parent [-]

From the GUI perspective, I hope Halloy correctly supports proportional fonts soon. They kinda work but not everything is aligned correctly.

andsoitis 4 hours ago | parent | prev [-]

Inspired by The Elm Architecture, Iced expects you to split user interfaces into four different concepts:

State — the state of your application

Messages — user interactions or meaningful events that you care about

View logic — a way to display your state as widgets that may produce messages on user interaction

Update logic — a way to react to messages and update your state