I’ve been following the work on COSMIC (though not super actively) and I keep on saying that I like what I’m seeing because, well, I do! The idea of a tiling DE is a very exciting one and COSMIC really has the potential to become a Major Linux DE.
I’m just happy there’s a rust DE being written in slint. KDE is nice and all, but it’s all C++. No way am I touching that trainwreck of a language again.
It doesn’t use GTK does it?
No, we have been making our own platform toolkit (libcosmic), which is built upon iced-rs. We are using this both for our wayland compositor applets, and our desktop applications.
iced? Interesting. I though it’s still pretty experimental. There’s no official documentation yet, right? When I was looking at Rust UI libraries Yew and Leptos looked more mature. I guess you’re confident iced have enough backing and isn’t going anywhere.
How do you find working in Rust on a bigger UI project? Any issues?
Iced is a lower level GUI library, similar to what GDK is to GTK. We built our own COSMIC-themed GUI toolkit around iced, which is called libcosmic. As we’ve gotten more and more widgets and application logic developed, actual application development with libcosmic is a breeze. Even if you do have to create a custom widget, it’s much easier to creating custom widgets in GTK. We’re able to develop much faster than we ever could with GTK now.
Yew and Leptos aren’t comparable since they’re not native GUI toolkits. These are for web developers rather than application development. It wouldn’t be possible to use this for developing layer shell applets for COSMIC, either.
Btw, is this the only reason that cosmic isn’t gtk, or are there other reasons? Because afiak gtk uses/can use rust.
The GTK4 project was cancelled for multiple reasons. We originally began working on Relm4 to use GTK4 for COSMIC applets. While others on the team were also experimenting with alternative Rust GUI libraries.
It required a lot of effort to patch GTK4 to support the Wayland layer shell protocol. Getting those patches merged into GTK4 was also taking a much longer time. There were long delays between code reviews; and they also wanted a series of much larger refactoring changes to be made to GTK4 before exposing the layer shell feature. It was much easier to get layer-shell working with iced, as it is a much leaner and concise code base.
GTK does not support fractional scaling, which is something we want our applets to support on day one. This was one of our major concerns. A concern that didn’t apply to iced.
It was also exceedingly difficult to create custom widgets with GTK in Rust. Even those of us with years of experience considered it to be unreasonably difficult. So it was not feasible to expect new hires on the team to be able to comfortably develop COSMIC components with it. In comparison, our team was able to develop custom widgets with iced with much less effort and with greater flexibility, so the demand for iced grew stronger.
At the end of the day, GTK is not a Rust toolkit, and its API is cumbersome to adapt to Rust. Use of GTK would always be a compromise that lessens the developer experience for COSMIC app and applet development. A compromise that would eventually require us to rewrite everything in a native Rust GUI library the moment it would become possible to do so.
Since we are developing a desktop environment from the ground up anyway, we decided that there would be much more value for our time if we contribute to the Rust ecosystem and utilize iced to make a fully featured GUI library for application development.
Why develop libcosmic around iced instead of going with something else modern that’s easy to develop in such as Flutter? Iced/libcosmic is probably a bit more efficient resource-wise but that probably wasn’t a huge point.
That would compromise our vision of a GUI platform built from the ground up in Rust. It would also not be feasible to use Flutter for applet development. We can easily make modifications directly to iced for all the Wayland integrations that we need in COSMIC, as the iced code base is very lean, and written in Rust.
Got it. So being written in Rust is one of the requirements. Makes sense. Flutter is great for self-contained applications but we can definitely use another sane native toolkit besides Qt that has wider applicability.
Why do we invent new DEs instead of making proper settings app in already existing ones?
Because that’s not how software development works, and that’s not how you make progress in the field. In order for our technical vision to be integrated with an existing desktop, such as GNOME, it would have required that they give us the reigns to their project to delete their entire codebase and rebuild it into exactly what you see today in COSMIC.
As in life, sometimes you’ve got to demolish, pave, and build better foundations. There’s a lot of cool technologies available to build a truly next-generation desktop experience in, but you’re not going to get it through rigid bureaucracy and old tools. With COSMIC, we’ve got freedom to make decisions and build something truly unique, and we’re using our talent to show you what we can do.
Well said. I’m nervous and excited to see what this turns in to. Pop is my daily driver and has been for years. I’m excited to see all this progress.
If you will create “next gen” desktop, you will just solve some problems of already existing ones and create your own. Maturity of software is far more important, than uniqueness. GNOME didn’t evolve into its current state for no reason.
Translation: no one should ever attempt to innovate on the Linux desktop. GNOME is the epitome of software development and everyone else should quietly give up. If GNOME can’t fix an issue, no one can. Only GNOME has the god-given right to make decisions on how desktops are developed for Linux. There can only be one party. The One Desktop principle. Contribute to your party leader, or else…
Because some developers act on their own consciousness and don’t have a slavemaster corporate manager telling them what they need to do or not do.
When one doesn’t like any of the available choices yet a new one is born. Can you measure how many v.terminals we have, or how many window managers on X11?
Fortunately such “new choices” get abandoned very quickly. Making new solution instead of improving existing ones is counterproductive. Unless there is a large legacy codebase. Smart people have invented Unix principles to avoid that.
We do what we must because we can.
FOSS software development is very much like evolution. Many projects are born but only the best thrive. It is a wasteful system because resources are spread over similar projects, but it creates very good software.
Not really. Best Foss projects do not always thrive. Git wasn’t really better than mercurial. But it had happened to be published earlier, so it got wider adoption.
It doesn’t have to be the best, it just has to be better than the current standard. Git was better than CVS and SVN, so it won.
Welcome to FOSS lol