• qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    9 days ago

    I wrote a GTK application in Rust some time ago and it was filled with macros to deal with lifetime issues. Most issues could only be solved with unsafe macros or Rc<RefCell<T>>. The experience working with it is probably a lot better when using newer declarative frameworks, but using it with a toolkit written for C wasn’t fun.

    I personally prefer it for cli programs. The executables are considerably larger than C programs due to static linking, but that does mean that it works regardless of what libraries you have installed without any hassle.

      • qaz@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 days ago

        Yeah, I wrote two “plugins” some time ago and the Assembly implementation was shorter than the Rust implementation due to the need to convert from C ABI and back 😅.

        I have taken a look at both Slint and Egui before, but they didn’t seem to integrate that well with the Linux desktop last time. I just checked again and it seems like Slint has a Qt backend now which is nice. I don’t really like immediate GUI frameworks, but JavaFX has so far been my favorite framework to work with so maybe I’m just weird.

        And yes, I have used min-sized-rust’s tricks for several of my projects, and it’s very effective. However statically compiling just doesn’t compare to using C and linking with the system libraries.