Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk-rs GTK3 bindings - no longer maintained #227

Open
c-git opened this issue Dec 23, 2024 · 5 comments
Open

gtk-rs GTK3 bindings - no longer maintained #227

c-git opened this issue Dec 23, 2024 · 5 comments

Comments

@c-git
Copy link

c-git commented Dec 23, 2024

Hi,

Thank you very much for the work done on this crate. cargo-deny brought it to my attention that the gtk-sys crate that this crate depends on is no longer maintained as per their repo. I tried searching to see if there was already an issue here but I couldn't find one. The details of the security advisory follows:

error[unmaintained]: gtk-rs GTK3 bindings - no longer maintained
   ┌─ /home/one/log-viewer/Cargo.lock:37:1
   │
37 │ atk-sys 0.18.2 registry+https://github.com/rust-lang/crates.io-index
   │ -------------------------------------------------------------------- unmaintained advisory detected
   │
   = ID: RUSTSEC-2024-0416
   = Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0416
   = The gtk-rs GTK3 bindings are no longer maintained.
     
     The maintainers have archived the repository, and added a note to the crate
     description and its README.md that the crates are no longer maintained.
     
     Please take a look at [gtk4-rs](https://github.com/gtk-rs/gtk4-rs) instead.
     ```
   = Announcement: https://github.com/gtk-rs/gtk3-rs/commit/508a69b63a3c5bf73790e0e59101a955847f30d6
   = Solution: No safe upgrade is available!
   = atk-sys v0.18.2
     └── gtk-sys v0.18.2
         └── rfd v0.15.1
             └── log_viewer v0.2.0
@PolyMeilex
Copy link
Owner

Oh, finally, a good excuse to remove the GTK backend 😄

On a more serious note, GTK3 backend is already optional, non-default and unrecommended, so I believe it is fine to depend on gtk-sys for it.

@c-git
Copy link
Author

c-git commented Dec 24, 2024

Ok I understand. I'm sorry to hear that though as that's what I use on Ubuntu. If I'm able to manage the time and can replace it with the new version would you be open to a PR?

@c-git
Copy link
Author

c-git commented Dec 24, 2024

Including the other advisory numbers here in case anyone is searching for them.

warning[unmaintained]: gtk-rs GTK3 bindings - no longer maintained
    ┌─ /home/log-viewer/Cargo.lock:148:1
    │
148 │ gdk-sys 0.18.2 registry+https://github.com/rust-lang/crates.io-index
    │ -------------------------------------------------------------------- unmaintained advisory detected
    │
    = ID: RUSTSEC-2024-0418
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0418
    = The gtk-rs GTK3 bindings are no longer maintained.
      
      The maintainers have archived the repository, and added a note to the crate
      description and its README.md that the crates are no longer maintained.
      
      Please take a look at [gtk4-rs](https://github.com/gtk-rs/gtk4-rs) instead.
      ```
    = Announcement: https://github.com/gtk-rs/gtk3-rs/commit/508a69b63a3c5bf73790e0e59101a955847f30d6
    = Solution: No safe upgrade is available!
    = gdk-sys v0.18.2
      └── gtk-sys v0.18.2
          └── rfd v0.15.1
              └── log_viewer v0.2.0

warning[unmaintained]: gtk-rs GTK3 bindings - no longer maintained
    ┌─ /home/log-viewer/Cargo.lock:165:1
    │
165 │ gtk-sys 0.18.2 registry+https://github.com/rust-lang/crates.io-index
    │ -------------------------------------------------------------------- unmaintained advisory detected
    │
    = ID: RUSTSEC-2024-0420
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0420
    = The gtk-rs GTK3 bindings are no longer maintained.
      
      The maintainers have archived the repository, and added a note to the crate
      description and its README.md that the crates are no longer maintained.
      
      Please take a look at [gtk4-rs](https://github.com/gtk-rs/gtk4-rs) instead.
      ```
    = Announcement: https://github.com/gtk-rs/gtk3-rs/commit/508a69b63a3c5bf73790e0e59101a955847f30d6
    = Solution: No safe upgrade is available!
    = gtk-sys v0.18.2
      └── rfd v0.15.1
          └── log_viewer v0.2.0

@PolyMeilex
Copy link
Owner

can replace it with the new version would you be open to a PR

This will prevent all projects that are still on GTK3 (like Tauri) from updating RFD, as having GTK3 and 4 in the same binary will cause linking problems. So it would have to be yet another separate backend.

And on top of that the update will not be trivial, the current GTK3 backend is a terrible hack that is attempting to hide away the fact that GTK is a full-blown UI toolkit (that loves to store stuff in random globals, so using it in multithreaded context is nightmare) rather than a file dialog API.

So to answer your question, if the GTK4 backend ends up being as hacky as GTK3 one, then I would just prefer to drop it in favor of proper XDG API. If GTK4 backend in contrast to 3 ends up being a sane solution, then sure we can merge it and live happily ever after.

@c-git
Copy link
Author

c-git commented Jan 3, 2025

Thank you very much for the explanation. I honestly don't know if it's worth it for me. I use egui most of the time and for native applications (compared to WASM) there is a really great project that I like and I might just go with that instead. Or try to see if the XDG backend works for me. I 100% agree that if GTK 4 needs to be a hack it's not worth going down that road. I didn't know how hard the upgrade would be why I was considering it but I have a lot on my plate right now and wasn't even sure how I was going to fit this in when I thought it might be easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants