-
Notifications
You must be signed in to change notification settings - Fork 723
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
[feature request] Blacklisting functions #1142
Comments
Sounds reasonable to me. |
It sounds like this is just a request to alias |
Heh, when I said "we pretty much already have the implementation", I was joking. Honestly, I'd consider the fact that ...but I guess the best step forward does in fact look more or less like exactly what you said:
|
I'm working on this. |
It looks like this is implemented: https://docs.rs/bindgen/0.44.0/bindgen/struct.Builder.html#method.blacklist_function Should this issue be closed? |
Yup, thanks! Fixed by #1364. |
In
lammps-sys
I have a feature to enable use of system include paths to locatempi.h
. When this feature is disabled, I want to forbid use of functions which depend on the MPI types.However, one of the functions I am exposing has such a type in its signature, leading to a compile error (cannot find type
MPI_Comm
in this scope). It is too difficult to write a whitelist pattern that does not match this function, so my workaround has been to instead define an empty enum replacement type when the feature is not enabled. (as a result, my feature flag is, strictly speaking, not purely additive in terms of build artefacts.)What would be far better is the ability to simply blacklist the function
lammps_open
.>_>
<_<
Incidentally, this functionality is already actually possible through the use of the
blacklist_type
function:so we pretty much already have the implementation. 😛
The text was updated successfully, but these errors were encountered: