The extern_fn_block_attrs (introduced in commit d5fc49c) option is not part of the public API of bindgen::Builder (not accessible through methods nor directly).
For context, I am using the programmatic Builder API through lib.rs to create -sys style crates but I'm running into issue similar to #2548. A key distinction is that my origin source code is correctly marked with __declspec and doesn't require a separate .def file.
What I want to achieve is to add #[link(name = LIBRARY)] to my extern "C" blocks, for largely two reasons:
- Ensure that the generated symbols can be verified to exist during compilation and
- Ensure that Windows-style DllImport and DllExport works with
extern static variables.
What are my options here? Should I open a PR?
I've looked at builder_from_flags but this is also not part of the public API.
The
extern_fn_block_attrs(introduced in commit d5fc49c) option is not part of the public API ofbindgen::Builder(not accessible through methods nor directly).For context, I am using the programmatic Builder API through
lib.rsto create-sysstyle crates but I'm running into issue similar to #2548. A key distinction is that my origin source code is correctly marked with__declspecand doesn't require a separate.deffile.What I want to achieve is to add
#[link(name = LIBRARY)]to myextern "C"blocks, for largely two reasons:extern staticvariables.What are my options here? Should I open a PR?
I've looked at
builder_from_flagsbut this is also not part of the public API.