-
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
Version 3 #40
Comments
For plan A you should keep in mind that some systems don't have X11, so that should be detectable. |
There would be functions to check the availability of libraries and functions, so you can avoid calling missing functions and causing a panic. Probably something like:
One of the current problems is that Ubuntu LTS 14.04 has an older version of Xrandr which is missing 5 of the functions defined in |
I'm wondering if perhaps x11-dl could also be made just a feature of the main |
My current plan is to define all types in |
A suggestion for version 3: |
Like |
Edit (20 October 2016): I'm working on a generator using clang. There will be a major restructure. The
x11
crate will have function bindings moved into a separate crate calledx11-static
whilex11
will only contain only types and constants (similar to thewinapi
crate). Bothx11-static
andx11-dl
will depend onx11
for these items so there will no longer be duplicates.x11-generator
will be a build dependency to generate the function bindings and will be available for custom bindings as well.x11
andx11-generator
will be built usingx11-parser
, which scans the C headers to generate bindings. The code generated byx11-parser
will be commited to the repository, so the C headers won't have to be present when building the Rust bindings.I am considering changing
x11-dl
to use lazy initialization. This will prevent the loader functions from failing if there are missing functions in order to avoid versioned structs. Instead, calling a missing function will cause a panic.Note: Version 3 probably won't be stable until untagged unions are a stable feature in Rust.
The text was updated successfully, but these errors were encountered: