-
Notifications
You must be signed in to change notification settings - Fork 39
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
Put bindgen behind a seperate feature #191
base: main
Are you sure you want to change the base?
Conversation
I don't know whether there's a prevailing best practice when it comes to sys crates, but my assumption has always been that the crate defaults to trying to use system libraries and the bundled library is an option / fallback. There's also a technical question around the bundled bindings: do they work correctly cross-platform? on 32-bit vs 64-bit? |
At least most of the Examples:
Some of them provide the possibility to use bindgen at build time to build your own bindings instead.
That depends on the header as far as I can tell. If it's written in a cross-platform compatible way it does work otherwise there might be issues for 32-bit vs 64bit or for windows vs linux or … Some of the crates above handle that by just providing different bindings for different platforms and conditionally including the right bindings for the target. Other provide the some feature flag to run bindgen at buildtime for that, and others do both. |
Is there any interest in moving this PR forward from the relevant maintainers? |
7446119
to
1d1a3e9
Compare
@urschrei @michaelkirk @lnicola What is required to move this forward? |
In I don't know the ABI compatibility story of GDAL, but I doubt that they are backwards-compatible. |
This commit changes proj-sys to not depend on bindgen by default as that introduces a quite heavy build time dependency (libclang) which might not be there on all systems. Instead bundled bindings for the proj version build by the `bundled_proj` feature are provided.
1d1a3e9
to
70c5fea
Compare
@urschrei @michaelkirk @lnicola This is another gentle ping if there is any interest in moving this forward |
This commit changes proj-sys to not depend on bindgen by default as that introduces a quite heavy build time dependency (libclang) which might not be there on all systems. Instead bundled bindings for the proj version build by the
bundled_proj
feature are provided.