-
Notifications
You must be signed in to change notification settings - Fork 66
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
Use a dynamic library instead #7
Comments
I like the idea of compiling a single binary that works with multiple system configurations! I'm not sure how I feel about this being the default behavior, but it would be easy to implement in the form of a feature. Maybe after I play around with it a bit, I'll change my mind and just make it the default anyway. Would it be sufficient to just search |
We can use dylib until |
I was thinking of using the |
I can get started on this as soon as I get home. |
I thought about working on it myself, but if you do it that would be awesome! Note that you probably need to add an attribute like |
I've run into a problem. The |
Arg. I'm aware of this limitation, but I thought that X11 didn't have any variadic function. |
I may have found a solution, but it's not quite as pretty as I had hoped. I wrote a macro with two patterns: one that takes the usual list of functions, and one that takes a list of functions followed by
I'm still working out a bug that's preventing it from compiling, but I should have a test working soon. Should I apply this to |
That would be nice! |
x11-rs now supports dynamic linking with a temporary macro when the |
Example usage:
|
Note that this is a bad usage of Cargo features. |
Fixed so |
Are you sure that it doesn't pass |
The build script uses pkg-config, so it might still pass |
I have the split working in a separate branch (dl_split). If you're okay with the changes, I'll submit a pull request to glutin. The only usage change would be using crate |
Sure, as long as you publish it on crates.io |
Glutin is soon getting support for Wayland, and as a such there is a small problem: Wayland users don't necessarly have X11 installed.
For this reason, I wanted to do what the SDL already does:
dlopen
the xlib library at runtime and load the symbols from it, instead of just linking with anextern
block.I have already been experimenting with a library named
shared_library
that would make this process easier, but I wanted to know if you would agree with this change first. If you do, I'll make the changes and open a PR.(the same question applies for osmesa, but opening two separate issues would be overkill)
The text was updated successfully, but these errors were encountered: