Gtk4 Tutorial

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. gladis

    [Deprecated] Easily import Glade-generated UI files into Rust code.

    Gtk-rs is still pretty bare bone.

    I tried to do my part by removing boilerplate using macros [1] [2], but it is still complicated to design GTK apps. Even since now, because Glade has been deprecated for GTK4 and no visual editor is available to replace it for now, making developers manually write XML while exploring the sparse documentation. This is a regression for developers' experience.

    I am really trying to like GTK after using Qt a lot in the past, but there is just too much effort. Things should be as simple as VB6/WinForms. With no visual GUI editor, I find myself to just write CLI tools in Rust instead of going the extra mile and creating GUIs.

    [1] https://github.com/MicroJoe/gladis

    [2] https://github.com/MicroJoe/gtk_liststore_item

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. gtk_liststore_item

    Automatic gtk::ListStore struct derive for Rust.

    Gtk-rs is still pretty bare bone.

    I tried to do my part by removing boilerplate using macros [1] [2], but it is still complicated to design GTK apps. Even since now, because Glade has been deprecated for GTK4 and no visual editor is available to replace it for now, making developers manually write XML while exploring the sparse documentation. This is a regression for developers' experience.

    I am really trying to like GTK after using Qt a lot in the past, but there is just too much effort. Things should be as simple as VB6/WinForms. With no visual GUI editor, I find myself to just write CLI tools in Rust instead of going the extra mile and creating GUIs.

    [1] https://github.com/MicroJoe/gladis

    [2] https://github.com/MicroJoe/gtk_liststore_item

  4. Gtk4-tutorial

    GTK 4 tutorial for beginners

  5. gtk-rs

    Discontinued Rust bindings for GTK 3

    I personally disagree with a lot of the changes GTK4 introduces, but I still think it's my favorite way to build quick little native apps on Linux. If you're well-versed in Rust, I really recommend checking out gtk-rs[0], a fantastic little crate with a surprisingly robust implementation. If you're familiar with 'builder' style tools (particularly Glade), your workflow will feel right at home. Plus, memory safety/type safety/good concurrency and all those other awesome Rust freebies you get.

    [0] https://gtk-rs.org/

  6. Yue

    A library for creating native cross-platform GUI apps

    I settled for Yue: https://github.com/yue/yue It's been around for several years. The deciding factor for me was that is has well maintained Lua bindings as part of the core project alongside JavaScript (Node.js) and C++.

    I didn't have much luck with libui (crashes, missing features, etc), and various immediate mode alternatives just require too many dependencies and other work that made integration too painful. Plus, Lua bindings for all these were always stale. In fact, Lua binding quality is pretty poor all around including for GTK, Qt, WxWidgets, and FLTK.

  7. gtk-rs-core

    Rust bindings for GNOME libraries

    "Automatically figuring out which parent objects the class you're subclassing derives from"

    AFAIK this is a language limitation, there is no way in a Rust macro to take a type and get all the traits that are implemented for that type.

    "Helpers for properties and signals"

    There is an open issue for this: https://github.com/gtk-rs/gtk-rs-core/issues/27

    "A flat list of methods, instead of the public/imp split"

    You can already do this in your code and use "pub fn" and "fn" like normal.

    "I feel like I had a difficult time figuring out how to share state between widgets. You end up with lots of OnceCell, Rc, and RefCell, and it quickly becomes confusing,"

    I think you are supposed to use bind_property and the gtk::Expression objects to do data binding, though that part is not so convenient to use from C or Rust either.

  8. areweguiyet

    A website built for the Rust community

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. Relm4

    Discontinued An idiomatic GUI library inspired by Elm and based on gtk4-rs [Moved to: https://github.com/Relm4/Relm4] (by AaronErhardt)

  11. mseide-msegui

    MSEide is a Rapid Application Development IDE for platform independent rich GUI applications in the Pascal language. It comes with its own GUI toolkit called MSEgui. Binaries: https://github.com/mse-org/mseide-msegui/releases

    https://github.com/mse-org/mseide-msegui

    Although a separate windowing set than Lazarus, both are enabled by the FreePascal compiler.

    Lazarus does have a GTK backend as an option on Linux.

  12. Rocket

    A web framework for Rust.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: Why are we not building web browsers?

    1 project | news.ycombinator.com | 22 Dec 2024
  • Setting up the Environment and Hello world in WASM with Rust 🦀

    1 project | dev.to | 24 Jul 2024
  • Show HN: Game of Life with grid editor in browser with Rust and WASM

    2 projects | news.ycombinator.com | 13 Dec 2023
  • Recreating the Apple Calculator in Rust using Tauri, Yew and Tailwind

    1 project | dev.to | 30 Nov 2023
  • Yew: Rust / WASM framework for creating reliable and efficient web applications

    1 project | news.ycombinator.com | 29 Nov 2023

Did you know that Rust is
the 5th most popular programming language
based on number of references?