Skip to content

Feature request: allow blocklisting by file #2096

@daviddrysdale

Description

@daviddrysdale

From #1200 (comment):

If the library you're binding against doesn't have any sort of type / function naming convention or what not, that can indeed be a problem. If you point me to an specific example we can try to figure out what's the best solution for that. Mind opening a new issue for it though?

One specific example of a library that doesn't have an easy library-wide naming convention is BoringSSL / OpenSSL.

We're looking at adding BoringSSL support to the openssl crate via bindgen, and we'd like to avoid including things from system headers in the generated code. I started trying to build an allowlist to just match things from BoringSSL, but I gave up when I reached 75 different prefixes (!).

So I wondered whether adding something like a --blocklist-file "/usr/include.*" option would be feasible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions