rust-bindgen
rust-bindgen copied to clipboard
'"type-parameter-0-0" is not a valid Ident' when using blocklist-item "std::.*"
Input C/C++ Header
#include <string> // or any other std header
void func1();
Bindgen Invocation
$ bindgen input.h --blocklist-item "std::.*" -- -x c++
Actual Results
panicked at '"type-parameter-0-0" is not a valid Ident', /home/supreme/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.51/src/fallback.rs:752:9
Expected Results
Successful binding generation without anything from std
I can actually get around this like so:
bindgen input.h --blocklist-item 'std::\w+.*' --blocklist-item 'std::_.*' -- -x c++
Then there's just an empty std mod in the generated bindings.
I have exactly the same issue, but I am using blocklist_type instead, from the build.rs script, like so:
.blocklist_type("std::.*")
Same issue when trying to make bindings for v8 (specifically, libv8_monolith.a) and using the following line in my build.rs:
.blocklist_item("^std::.*")