Hacker Newsnew | past | comments | ask | show | jobs | submit | lazypenguin's commentslogin

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.


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


On their fork of Iced.

They contribute back but it’s a notable distinction.


Alternatively, Flutter desktop with flutter_rust_bridge works great. Sure, not fully Rust, but Flutter has way more packages on the GUI side than, I'd say, all of the Rust GUIs combined, simply due to how much older it is.


I'd rather use Tauri with any web front-end like React (which we do in my company)


and it's slow as molasses, at least in my experience


It feels a little cringe how Elm and the "Elm way of thinking" is so heavily emphasised, but after using Iced, IMO this is probably one of the best gui models without having to implement signals or message passing or IPCs like Dioxus/Tauri does with frontend/backend. Other key advantages Iced has includes daemon mode, native ability to use multi threading and also multi-window support

That said, for actually building most apps, what's more important is likely ease of learning and using the framework, platform/OS support, publishing support, etc, none of which Iced itself directly address.


> When you start needing things like undo/redo you suspiciously start architecting something that smells like the elm architecture.

Well Iced itself claims to be inspired by the Elm Arch, so that checks out (see the first line under the Overview section of the Readme https://github.com/iced-rs/iced )


Right now Dioxus is looking good, specially after they stabilize their native renderer (Blitz)


Desktop UI toolkits are dead or stagnant but the desktop ui is still king IMO


I would much rather see web apps become canvas rendered WASM versions of desktop apps than desktop apps become webview apps. Latter is what we have been seeing in the recent years unfortunately.

Canvas rendered cross-platform UI frameworks like Flutter & Avalonia targeting browsers (WASM), might shift the balance back in favor of desktop UI.


> By switching to fetch(), we can take advantage of its support for readable streams, which allow for a stream of content to be swapped into the DOM, rather than a single response.

Based on this section, it will be interesting to see how this evolves. I've used HTMX a bunch but after stumbling on Datastar I've come to prefer it. Partially because I don't need something like alpine.js to get some frontend goodies but also because I've come to appreciate the power of SSE streaming morphable targets to the browser


As far as I’ve seen, Apple is to blame here as they usually make it harder to target their platform and don’t really try to cooperate with the rest of the industry.

As a game developer, I have to literally purchase Apple hardware to test rather than being able to conveniently download a VM


for games, how would you test in a VM, when games so explicitly want direct hardware access?

i am obviously misunderstanding something, i mean.


I run Linux and test my Windows releases on a VM. It works great.

Sure, I'm not doing performance benchmarking and it's just smoke tests and basic user stories, but that's all that 98% of indie developers do for cross platform support.

Apple has been intensely stupid as a platform to launch on, though I did do it eventually. I didn't like Apple before and now I like it even less.


I develop a game that easily runs on much weaker hardware and runs fine in a VM, I would say most simple 3D & 2D games would work fine in a VM on modern hardware.

However, these days it's possible pass-through hardware to your VM so I would be able to pass through a 2nd GPU to MacOS...if it would let me run it as a guest.


on linux, KVM provides passthrough for GPUs and other hardware, so the VM "steals" the passed through resources from the host and provides near-native performance.


I'm not a subject matter expert, but I do find it a little odd to read the second half of that. I'd expect, beyond development/debugging, there's certainly a phase of testing that requires hardware that matches your target system?

Like, I get if you develop for consoles, you probably use some kind of emulation on your development workstation, which is probably running Windows. Especially for consoles like XBOX One or newer, and PS4 or newer, which are essentially PCs. And then builds get passed off to a team that has the hardware.

Is anyone developing games for Windows on Apple hardware? Do they run Parallels and call it a day? How is the gaming performance? If the answers to those 3 questions are "yes, yes, great", then Apple supports PC game development better than they support Apple game development?


> Like, I get if you develop for consoles, you probably use some kind of emulation on your development workstation

I don’t think anybody does this. I haven’t heard about official emulators for any of the mainstream consoles. Emulation would be prohibitively slow.

Developers usually test on dedicated devkits which are a version of the target console (often with slightly better specs as dev builds need more memory and run more slowly). This is annoying, slow and difficult, but at least you can get these dev kits, usually for a decent price, and there’s a point to trying to ship on those platforms. Meanwhile, nobody plays games on macs, and Apple is making zero effort to bring in the developers or the gamers. It’s a no-chicken-and-no-egg situation, really.


Basically you are correct, MacOS has to be treated like a console in that way. Except you get all the downsides of that development workflow with none of the upsides. The consoles provide excellent debugging and other tools for targeting their platform, can't say the same for MacOS.

For testing, I can do a large amount of testing in a VM for my game. Maybe not 100% and not full user testing but nothing beats running on the native hardware and alpha/beta with real users.

Also, since I can pass through hardware to my VM I can get quite good performance by passing through a physical GPU for example. This is possible and quite straightforward to do on a Linux host. I'm not sure if it's possible using Parallels.


You do it for Xbox and PlayStation and Nintendo.


I'm sure you literally purchased Nvidia hardware for game development.


A component is much cheaper than an entire dedicated system (which would of course contain a similar component).


I don't know; a 5090 costs about 3k, a 5070 about 500. You can either buy a MacBook Pro or a Mac Mini. Seems reasonable.


I don't hate React developers. I hate developers who build consumer facing software and use top of the line hardware and networks to test it while being ignorant to the fact that most of their users will be using their products on 8+ year old consumer grade hardware over spotty 3G


And then there's the devs and PMs that have an irrational fear of the back button -- enough so that they never ever use it on their SPA.


No my experience is the inverse. The type of library you describe is nice for the basic queries but once you start needing CTE, subquery, postgres json query, etc. it just because easier to manage it all in SQL directly.


I'm using JOOQ. Not saying that JOOQ is the greatest library, but all of what you just mentioned works in there without problem. Including CTEs and json stuff.

With a library such as SQLx, you can never really factor anything out. Or at least it's very hard and you lose the actual typesafety. I've been there and done that with doobie [https://typelevel.org/doobie/] which is basically the same in green.


My original title was edited after submission but here the lead developers of bevy/iced/dioxus have an interesting discussion about the ethics of code reuse vs recognition in open source projects. I thought it could trigger some interesting wider discussions


There’s a big advantage to having your whole application in one language. I’m not sure the experience of egui on mobile though but egui is great to use as a developer

Pros

- Solid widget set

- Easy to get started

- Less state management

- Easy to make custom widgets

- Active community and crates (e.g docking view, tables, etc.)

- Fast to build new Ui

Cons

- Harder to do layouts (has multipass and some flexbox crates but still hard and compile loop makes it slow to iterate)

- Bring your own architecture (no restrictions on how you build your app so easy to make spaghetti if you’re not careful)

Egui is currently my favorite Rust UI crate although Slint and iced are also interesting.


iced now has hot reloading :tada:

https://github.com/iced-rs/iced/pull/3000


QML is nice and the bridges project could bring it to more languages. https://slint.rs/ Is similar but written in Rust although.


I’ve played with Slint and it’s nice but depending on how this plays out it might be a concern. QML is of course much more mature than Slint. It would be interesting to read an in depth blog post by Slint about why fundamentally Slint is better than QML since one of the main advantages (multi-language) is potentially being nullified here.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: