this post was submitted on 27 Nov 2023
79 points (95.4% liked)

Linux

48008 readers
1194 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I always see new GTK apps popup on Flathub. I dont really care and think GTK looks fancy, although CSD suck a bit and they waste space and often functionality.

But they work, are solid, and do what they should.

Qt on the other hand may seem more like a complex job to code with. I dont actually think so, but I heard especially writing rust with GTK is way better than with Qt.

I like KDE a lot, and even though I am excited for Cosmic I think Qt is the better toolkit for many things and a lot of time. But Dolphin seems to suffer from memory safety issues all the time, as well as other projects.

Do you have experience in rust, using GTK or Qt? How do they compare?

you are viewing a single comment's thread
view the rest of the comments
[–] Max_P@lemmy.max-p.me 73 points 11 months ago (9 children)

C bindings and APIs generally work much better in Rust because the language works a lot more like C than it does C++.

Qt depends a lot on C++ class inheritance, and even does some preprocessing of C++ files to generate code in those classes. That's obviously not possible when using Rust. And it looks like you need a fair bit of unsafe there and there to use it at all too.

Meanwhile, GTK being a C library, its integration with Rust is much more transparent and nice.

So if you're making a GUI Rust app, you're just kind of better off with GTK at the moment. It's significantly easier and nicer.

[–] sleep_deprived@lemmy.world 19 points 11 months ago (8 children)

Having made the choice to use GTK for a Rust project years ago - before a lot of the more Rust-friendly frameworks were around - this is exactly why I chose it. Nothing to do with DEs or any of that, just looking for a better coding experience. Now I'd probably choose one of the several Rust-focused solutions that have popped up though.

[–] joao@aussie.zone 9 points 11 months ago (7 children)

Any examples of such rust-focused solutions that popped up?

[–] it_a_me@literature.cafe 2 points 11 months ago

Slint has fairly decent docs and has worked fairly well for my small projects

load more comments (6 replies)
load more comments (6 replies)
load more comments (6 replies)