There are some times that I make something and the terminal isn’t enough. I want to make it user-friendly and add buttons and dropdowns and stuff. I mainly write C, so I want a well-known and good GUI library for C. I have tried learning Qt but the documentation was awful and all the examples were for C++ or Python. I also am aware about libraries like imgui but it’s more for debugging UIs I think and not for normal applications that end users use.

I also would like the library to be platform-agnostic, or at least just work with Linux because that’s what I am using.

If you also code in C, what do you use to make GUIs? What do you suggest me to use?

Thanks in advance.

Also, if anyone suggests Electron or anything involving a browser, I will find them and remove one electron from each atom of theirs, turning them into smoke.

  • brisk@aussie.zone
    link
    fedilink
    arrow-up
    2
    ·
    17 hours ago

    I’ve recently started a handful of projects exploring the rust gui ecosystem and the experience has been… disappointing.

    • The most mature native library I’ve seen is Druid, which is deprecated in favour of Xilem. Xilem is highly experimental.

    • Slint is somehow used by several industry partners, yet is incapable of rendering flowing text documents, and only just brought in text formatting (via Xilem’s text library oddly enough).

    • Egui seems a bit more capable, but it has the usual downsides of immediate mode gui without any of the typical upsides (you can’t intermingle gui elements with logic, the gui has to all go in one place).

    • Dioxus is reasonably capable but is absolutely webtech focused, which seems likely anathema to Op.

    • Iced I haven’t used beyond hello world, and I didn’t enjoy that experience.

    AFAICT the most mature rust gui libraries are the rust bindings for C’s GTK and C++'s Qt.

    I also - somewhat controversially - disagree with “very well documented”. Rust projects consistently have published API references - which is great! The actual quality of the API references is mixed. Actual documentation - such as intended usage, common patterns, design intent - are much more sparse. Of the GUI libraries I listed, only Dioxus and Slint come close.