Closed Lokathor closed 4 years ago
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 *const c_char
instead of &str
now, but it's for their own good.
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. ffe151eec35ce2e592324d77c993754a323c38ce, 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?
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.