8 ms·
I'm excited that they push Iced [1], a Rust-based cross-platform UI framework. Probably not the Rust framework which I would've betted on as the most promising
by ThePhysicist 2y ago
I'm excited that they push Iced [1], a Rust-based cross-platform UI framework. Probably not the Rust framework which I would've betted on as the most promising one, but with the broad support and larger adoption I hope it will catapult it into the mainstream, we really need a good UI library that's not a web renderer. I was also quite excited about GPUI [2] but there seems to be very little activity in the repo for now (hard to judge though, I imagine they're just busy hacking on the editor).
I wanted to write a desktop app with Rust for a while and considered Tauri, Flutter (via rust-flutter-bridge) or a native framework like Iced, I think with the larger adoption it might make sense to go with Iced, though it's probably still much more experimental than frameworks like Flutter.
1: https://iced.rs/ https://iced.rs/
2: https://www.gpui.rs/ https://www.gpui.rs/
- mgrandl 2y agoI am building an app [0] with GPUI. I think it’s very ergonomic, but it’s missing so much stuff that you would expect in a GUI library. There isn’t even a text input element. I would be lying if I wasn’t thinking about jumping off. I gotta say, Iced doesn’t appear to scratch the same itch though. The only one that comes close to what I want is Vizia [1]. [0] https://github.com/MatthiasGrandl/loungy https://github.com/MatthiasGrandl/loungy [1] https://github.com/vizia/vizia https://github.com/vizia/vizia
- james2doyle 2y agoLooks like TextInput was just added in the last week: https://github.com/iced-rs/iced/blob/master/widget/src/text_input.rs https://github.com/iced-rs/iced/blob/master/widget/src/text_...
- unshavedyak 2y agoMind going into a bit more depth on "scratch that itch"? I've been debating Iced vs GPUI, would love any deeper thoughts you have on the subject. Performance and UX are probably my largest concerns, fwiw. Loungy and Helix-gpui were my inspirations to look into GPUI, so i'd love your thoughts :)
- mgrandl 2y agoMy biggest reason for wanting to switch away from GPUI is because there is barely any momentum in making it a general purpose framework. Zed team is mostly just focusing on Zed usecase and the end user is left implementing basic functionality themselves. On top of that you are stuck with their async runtime of choice (smol), while Iced supports both tokio and smol. This is annoying when you have some tokio dependencies, of which there are a lot. I played around with Iced a bit now. I like it a lot. The only issues that keep me from porting are: 1. I can’t replicate the GPUI popup window with winit. I am currently trying to patch winit to make it possible, but am a bit lost. 2. I do like the tailwind like syntax for styling components in GPUI a lot. It just fits my mental model a lot better than Iced. That said I think Iced is the cleaner framework of the two and if you are designing a traditional windowed application, I would recommend it in a heartbeat.
- unshavedyak 2y agoThanks! Ironically i am trying to make it bordered similarly to Zed (which i assume is what you're referring to), so i may run into issues there, but i imagine that's a far lesser concern for at least a year. Appreciate the reply, thank you!
- mgrandl 2y agoWhat do you mean with bordered? The Zed application window is a fairly default NSWindow (on MacOS). You will have no problems replicating it in Iced/Winit. The popup WindowKind in GPUI is just used in Zed for some notifications as far as I am aware.
- panick21_ 2y agoFor Cosmic there is 'libcosmic' its a wrapper around iced that adds a bunch of useful stuff.
- Tmpod 2y agoI've been enjoying Slint[0] lately. It is inspired by QML but is entirely implemented in Rust. From what I understand, it also transpiles the .slint files into Rust. [0]: https://slint.dev https://slint.dev
- F3nd0 2y agoDiscord chat, Expat licence, GitHub repository... perhaps we also need a good UI library that manifests a greater desire to cultivate user rights. I'd say that's just as important as technological advancement, if not more.
- pengaru 2y agosad reality when such HN comments get downvoted
- kelnos 2y agoI think this is a very shallow take. I'm a GPL proponent and have worked on/released GPLed software for a good 20 years, now, and I think it's distasteful to judge how people choose to license the work that they do for free, and effectively "donate" to society. I do wish more things were covered under licenses with strong "copyleft", but I don't begrudge anyone the ability to license their hard work however they please.
- addicted 2y agoWhy should that be distasteful? Google gives us Chrome for free. Does that make it distasteful to question their decisions around using our data because they’ve made it free?
- entropicdrifter 2y agoIndividuals donating their time and effort to the public, whether that excludes for-profit use or not, is better than them not doing it. At least I think that's what the person you replied to is trying to get at.
- Sanzig 2y agoCan we stop with these drive-by comments on every project that uses a permissive open source license? You are certainly welcome to create your own UI framework under the GPL if you want. The contributors have chosen MIT and that is a perfectly valid decision.
- WD-42 2y agoIt seems super productive as well. Modern Rust is ergonomic. Take a look at some of the community PRs being merged in to Cosmic and you can see how good a developer experience it is. Compared to c/c++/qt/gtk it is a breath of fresh air. Iced is also super themeable which is a really nice change compared to GTK. Check out https://cosmic-themes.org https://cosmic-themes.org as an example!
- ratorx 2y agoWhat exactly does it do better for them ability than GTK? It’s been a while since I’ve used desktop Linux, but there were lots of GTK themes back then. https://www.gnome-look.org/browse?cat=135&ord=latest https://www.gnome-look.org/browse?cat=135&ord=latest suggests there are plenty now. Is it more capable? Easier to create? I don’t think it’s obvious just from the theme store.
- WD-42 2y agoI suppose I misspoke a little. GTK has a stylesheet that can be modified. In fact the Cosmic appearance settings has an option to apply the current Iced theme to GTK apps. Gnome does not expose this at all (except for the built in dark mode) and they actively discourage any kind of theming. Gnome 47 will finally support accent colors, which they reluctantly implemented after it became a freedesktop standard and most distros were patching it in anyway.
- tuna74 2y agoIf you theme apps without testing there is always the change that you break apps with complex or custom widgets. It is kind of sad seeing your app looking and behaving like crap due to some random them that the distro apply to all GTK-based apps without doing any testing or validation.
- WD-42 2y agoWhich is why the approach iced/libcosmic is taking is great. It's mostly just changing colors and some border radius. As a user, I can make my GUI match my text editor/terminal and I'm happy. It's not like the old days of GTK2.x with pixbuf themes making everything crazy (although that was fun). After all this is desktop linux, people tend to gravitate to it because they want to be able to tweak things. I mean even OSX has had accent colors for years, ffs.
- rafram 2y agoI assume this means accessibility is roughly zero. I'm sure it was a ton of fun for the engineers to write with something exciting and new, but the downsides of using a half-baked UI framework are significant. I tried Halloy [1], an IRC client that's listed as the first showcase app on Iced's site. It's pretty, but it doesn't even support triple-click selection or context menus. There is no menubar on macOS. Iced is very nice for an upstart UI framework - I don't want to minimize the amount of work that they've put into it, and how cool it is that they've gotten so far - but shipping a desktop environment based on it is shortsighted. [1]: https://github.com/squidowl/halloy https://github.com/squidowl/halloy
- airstrike 2y agoHalloy has context menus. https://images2.imgbox.com/20/05/yOa1IrVS_o.png https://images2.imgbox.com/20/05/yOa1IrVS_o.png Iced has accessibility listed as the first item on its roadmap after the upcoming 0.13 release. https://whimsical.com/roadmap-iced-7vhq6R35Lp3TmYH4WeYwLM https://whimsical.com/roadmap-iced-7vhq6R35Lp3TmYH4WeYwLM You're misjudging an experimental library for not having every feature you could ever want before an 1.0 released without doing your diligence. The docs literally open with iced is a cross-platform GUI library focused on simplicity and type-safety. Inspired by Elm. Disclaimer –––––––––– iced is experimental software https://docs.iced.rs/iced/ https://docs.iced.rs/iced/
- rafram 2y agoNot text editing context menus like any native app. As I said, Iced looks awesome. But it's also, as you said, experimental. Using an experimental library for a DE could be a huge mistake, no matter how promising the roadmap is. Ideally you'd wait for the project to ship some of the non-negotiable things on the roadmap (accessibility, system menus, RTL text, keyboard navigation...) before tying your fortunes to it.
- airstrike 2y agoI think native context menus are out of scope for iced and probably to be addressed upstream by winit. patches welcome. at the risk of sounding like a fanboy, I encourage you to try to use iced as a library first to see how powerful it is in terms of performance, ergonomics and overall just the quality of its design. hecrj is a prolific coder and I'm confident I'm not alone in this assessment. I'm pretty bullish on the path ahead for the library given those fundamentals, and I can't speak for the COSMIC team but I imagine that assessment probably overlaps with theirs.
- airstrike 2y agoI spent months mulling over whether to go with iced, Dioxus, Tauri, Flutter, Yew, Slint, Egui, Relm4, Ribir, even ratatui.... and probably more I'm forgetting iced wins by a landslide. it's just hard to learn at first but mostly because you start "not thinking with portals" and struggle. 9 out of 10 times I was just holding it wrong when I struggled.
- unshavedyak 2y agoDid you review GPUI at all? I'm also having this debate. Performance, stability and longevity are my biggest concerns. GPUI seems so focused on Performance that it's really attractive, but it's also a UI lib second to the App that it's written for, Zed. So i'm a bit flummoxed on if it's worth investing time and effort into. Iced is my comparison, just not sure how the performance can compare to GPUI.
- airstrike 2y agoI did not try GPUI but iced's performance is so blazing fast I doubt it will be an issue for you.