-
Notifications
You must be signed in to change notification settings - Fork 117
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
The big 2018 cleanup #507
The big 2018 cleanup #507
Conversation
And just to be extra clear: this will at least slightly break nearly every user of the crate when they upgrade from 0.14 to 0.15, because the loader function is passing |
/// thread, but there is a relaxed load when calling a function (which on | ||
/// `x86`/`x86_64` is "basically free", but on other systems it might not | ||
/// be). | ||
pub use_atomics: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we might want to make these private and use a builder-style thingy to save us from future grief with versioning?
This is looking good! Still need to look closer though, I've only done a cursory pass over it right now. I'm also really interested in what people downstream have to say. |
Re. ffe151e, I do see many people using the static stuff for the platform-specific extensions. For example ocl-interop and rust-glx. Should we be getting folks to use the loaders for these, or is this accepted as best-practice in this case? |
also move the registry doc generation up into the Registry module so that more generators can potentially use it.
if it can't be 0, it couldn't have been uninit anyway.
uses builder style defaults to no trace, no debug, atomics on. all crates on 2018 edition now these tests are really getting out of control!
As discussed on Discord, closing this until more time can be found to work on this repo. |
Highlights:
GlobalGenerator
andStructGenerator
got a huge facelift. They now occupy half the space per function that they did before. They also will generally load faster because they pass the function name to look up directly in*const c_char
form, so that loader function doesn't have to allocate a temporary string for every lookup.GlobalGenerator
andStructGenerator
now have more options for how you build the bindings regarding trace support and error checking support. Also included is a Default impl if you don't want to think about it too hard (the default is to turn on all the extra support).DebugStructGenerator
is totally gone, useStructGenerator
with the debug settings on.StaticGenerator
andStaticDebugGenerator
are not gone but they are also not upgraded at all. They've been changed the minimum amount so that they build with 2018-edition and the changes toRegistry
.So, because of that last point, basically every test fails to build, to the point where we can't even test that the output is still good or not.
So we need to decide what to do there. We could preserve the
include!
ability of the output, but then people would manually have to put all sorts ofallow(foo)
tags on whatever module does the include.