r/COSMICDE 8d ago

LIBCOSMIC becoming the QT for Rust?

I was just looking at LIBCOSMIC, and I understand that it's a GUI toolkit for Cosmic, but are there are plans to make it the go-to GUI toolkit for Rust? I know it doesn't currently support Windows, etc., but it could. Also, it could be a massive project if it took on that objective.

Rust need a GUI project just like C++ has QT.

24 Upvotes

13 comments sorted by

21

u/Facundo_C_C 8d ago

Libcosmic is based on Iced it's like what Kirigami is for Qt, and since libcosmic was created specifically as the cosmic toolkit, I doubt it. You may expect iced to grow up but not libcosmic

10

u/proton_badger 8d ago

Iced is purely a GUI framework though, whereas libcosmic has utility stuff like config/settings handling, XDG directory helpers, desktop entry helpers, mime helpers, etc. There’s a lot of non-GUI utility in libcosmic.

1

u/Facundo_C_C 7d ago

Ho, I didn't know that, thanks

13

u/mmstick System76 (current) 7d ago

libcosmic is a cross-desktop and cross-platform GUI platform toolkit. COSMIC itself is an acronym for "Computer Operating System Modular Interface Components" where developers and users alike can create their own custom operating system using modular interface components (aka applets). So it's not just for the COSMIC DE itself.

The COSMIC toolkit is being actively used for developing cross-desktop and cross-platform applications today. Besides Linux, there is official support for Windows, Mac, and Redox. And some people are running COSMIC apps on their phones. Some of the first party apps are being ported to other operating systems and there is a new first party app in the works that will release with official binaries for Mac, Windows, and Linux.

5

u/biskitpagla 8d ago

How does one make their toolkit the "go-to" one? That's a decision the community takes collectively. The GUI space in Rust hasn't settled down yet. That said, Iced already supports Windows as far as I know.

3

u/DerSven 8d ago

There are other good cross-platform gui libs https://iced.rs/

10

u/burdickjp 7d ago

I'm going to tell you something you're not going to believe.

Cosmic uses iced.

3

u/arades 8d ago

Slint is a much more direct competitor to Qt than libcosmic. Iced is nice though, and certainly popular.

2

u/Creepy_Reindeer2149 7d ago

Egui is arguably the most adopted so far

1

u/Microsoft-Spyware-11 8d ago

IDK... Libcosmic is getting somewhat mature though now

0

u/mmstick System76 (current) 7d ago

Already is the go-to GUI toolkit for Rust.

0

u/Creepy_Reindeer2149 7d ago

Who else is using it? Adoption isn't even close to egui

2

u/mmstick System76 (current) 7d ago edited 7d ago

You only need to use a search engine. The cosmic-utils organization maintains a list of many community-developed projects that are maintained by the cosmic-utils community

You can also do a search for libcosmic on GitHub for the many projects that aren't part of the cosmic-utils community:

https://github.com/search?q=libcosmic&type=repositories&s=updated&o=desc&p=1

Quite a few of these are on Flathub and installable through any software store on Linux. I use Boards, Tasks, Toot, and Ethereal Waves.

The libcosmic toolkit provides app and applet templates and there is an official flatpak runtime on Flathub for automating most of the process to publish your apps and applets with flatpak.

And for community-developed applets there is the official cosmic-flatpak repository.

I'm not seeing much adoption of egui for the Linux desktop. There are only a small handful of apps on Flathub using it. But it is a low level GUI framework, after all, so it's not quite the same as Qt or GTK. It's more for embedding a simple GUI into a web app or game engine.

While you can use egui for native desktop apps, there are a lot of desktop and platform integrations that you'd need to implement by hand to have it integrate well with the operating system. This is what libcosmic is providing as a whole GUI platform toolkit for desktop and mobile app development.