AltF02 / x11-rs

Rust bindings for X11 libraries
https://docs.rs/x11
MIT License
204 stars 66 forks source link

Also search for dylibs in case we are on Darwin #169

Open luke-clifton opened 1 year ago

luke-clifton commented 1 year ago

I have a use case where I want to run X11 applications on Darwin (using Xquartz). I've tested this change on Linux and MacOS.

I didn't introduce a conditional here, though I can if that is preferred, just let me know.

I did not run cargo fmt on this branch because it made changes elsewhere in the code. The part I added is unchanged by cargo fmt.

luke-clifton commented 1 year ago

Sorry, meant to mention, I will add the dylibs to all the loading paths if this approach is acceptable.

AltF02 commented 1 year ago

Apologies for my absence, unfortunately I'm unable to test Darwin.

Maybe an idea to use the cfg attribute? E.g. #[cfg(target_os = "macos")]