-
Notifications
You must be signed in to change notification settings - Fork 133
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
Support Windows #236
Comments
Hi! There is no windows support at the moment, and as I don't run dbus on windows myself (and know nobody else that does) it's unlikely that I'm going to port it myself. I'll be happy to review and merge PRs that add Windows support. |
Is there a good primer on DBUS and can someone roughly estimate how large that change might need to be? |
@ccoenen Not sure if D-Bus itself is what you need the most knowledge in. It's more about knowledge about how to port things to Windows in general. I don't think the changes to the Rust code will be large, the work would be more about figuring out how to set up an environment to build it. |
libdbus itself is ported to windows. It is provided prebuilt in MSYS2 mingw, it also can be built using CMake+MSVC. As far as I understand, the only issue in Rust code is that dbus-rs uses Looks like there are 2 changes needed:
(2) is only necessary for MSVC build of dbus, (1) prevents it from being used even in mingw environment. |
So, on Windows Only a small issue - |
or may be not so small: https://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64 https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 :
Now I'm not sure if I want to use libdbus on windows (and thus this library too) |
Looking at the answers on the stackoverflow thread, it seems to be safe in practice but not in theory. |
Even though #320 has been merged, dbus-rs is currently only usable in mingw environment, because it depends on pkg-config to find libdbus. libdbus has CMake config on Debian and Fedora. As far as I can tell, D-bus' Autotools build system always generates and installs CMake config. On Windows without mingw (i. e. MSVC builds of libdbus), pkg-config may be unavailable. So maybe switch to CMake for searching for the library? And keep pkg-config as a fallback when it's available |
I don't use D-Bus on Windows myself so I have no idea how people build Windows there. If you were to add some build instructions or so I'll be happy to review and merge that. Same goes for other Windows support patches, as long as they don't add additional dependencies or other trouble for Linux/Unix platforms (which has several orders of magnitude more users). |
https://www.freedesktop.org/wiki/Software/dbus/ here we can read that dbus has been ported to windows, but when building the crate there are only errors
The text was updated successfully, but these errors were encountered: