Thoughts on Iced
Author: Alyssa Riceman
Posted:
Iced is a GUI library for Rust. It was the first GUI library I ever tried, back slightly over a year ago when I was first learning the language—the first in any language, to be clear, not just in Rust—and it remains the one I’ve spent the most time with, because I haven’t done much GUI-related work since then.
Today, I finally revisited Iced for the first time since then. It’s advanced in that time, iterating from version 0.1 to version 0.3. I’ve advanced in that time, going from my first ever serious Rust project over to being an at-least-vaguely-experienced Rust programmer. So, in the context of all that advancement, have some thoughts:
- The documentation is Not Easy to navigate. (This seems to be a recurring theme between Rust GUI libraries; the others I’ve looked into tend to be even worse in that regard.)
- The example code, unlike the documentation, is relatively straightforward and easy-to-read. The more you can assemble your program out of chopped-up pieces of example code without needing to resort to the docs, the easier your life is likely to be.
- Iced has two major traits you can use to define your application:
Application
, andSandbox
.Application
is horribly intimidating, because it relies on Rust’sasync
-related features and I haven’t yet gotten around to learning those. (They’re my planned next project, once I figure out GUI-building.)Sandbox
, on the other hand, is pleasingly straightforward and simple, and for my current purposes is more than enough to go with. - The library’s outputs are horribly bloated. A completely minimal Windows executable built with Iced—spawning an entirely empty window, with no update-related behavior—was about twenty megabytes.
That final point was a dealbreaker for me, when I noticed it; on that basis, I’ve decided to move my GUI-learning efforts over to Druid, whose minimal Windows executable size is a far-more-reasonable ~2.6MB, albeit at the cost of much less conveniently easy-to-eyeball example code. But, for those less concerned with bloated executable size than I am, I continue to find Iced to be the easiest-to-understand of the Rust GUI libraries I’ve looked into thus far.
Tags: Rust