Bindgen whitelist/blacklist confusion

I'm trying to generate bindings for libtermkey, the code is here. I initialize bindgen here.

The question is I can't figure out how to blacklist/whitelist functions/types/structs. Currently this generates bindings for a bunch of pthread stuff, libc math stuff etc. I don't want any of this. So far I tried:

  • Using methods like whitelist_type and whitelist_function with function/type names.
  • Using balcklist_function and blacklist_type with regex like ".*" to blacklist everything and explicitly whitelist wanted items.

But I still get bindings for everything reachable from the header file in the generated bindings.

(I'm checking it with cargo doc --open)

How do I make rust-bindgen generate only the bindings I ask for? I checked the user manual and also rustdocs, but no luck

Thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.