gtk-rs / gtk-rs-core

Rust bindings for GNOME libraries
https://gtk-rs.org/gtk-rs-core
MIT License
279 stars 112 forks source link

[FEATURE REQUEST] Unix sockets should no longer be gated to `#[cfg(unix)]` #912

Open YaLTeR opened 1 year ago

YaLTeR commented 1 year ago

Since GLib 2.72, GUnixSocketAddress is available on all platforms. It requires underlying system support (such as Windows 10 with AF_UNIX) at run time.

Before GLib 2.72, <gio/gunixsocketaddress.h> belonged to the UNIX-specific GIO interfaces, thus you had to use the gio-unix-2.0.pc pkg-config file when using it. This is no longer necessary since GLib 2.72.

The GLib MR doing this: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2445

sdroege commented 1 year ago

The fd API has to stay UNIX-only, I think. There's nothing for fds on Windows in std. Otherwise that seems all easy to change with a bit of conditional compilation changes.

Do you want to work on that?

YaLTeR commented 1 year ago

Not sure. For now I was just looking at different ways of connecting two processes together (GLib or otherwise) and noticed that this was still gated.