-
Notifications
You must be signed in to change notification settings - Fork 747
Feature request: allow blocklisting by file #2096
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
Comments
Implementation-wise, would adding a Happy to send over a draft PR for this if it sounds helpful/sensible. (There's one special case that turned up when I was experimenting – some standard integer types from |
Update Item to hold a `clang::SourceLocation` and use this to allow blocklisting based on filename. The existing code has a special case that always maps <stdint.h> integer types to corresponding Rust integer types, even if the C types are blocklisted. To match this special case behaviour, also treat these C <stdint.h> types as being eligible for derived Copy/Clone/Debug traits. Fixes rust-lang#2096
Update Item to hold a `clang::SourceLocation` and use this to allow blocklisting based on filename. The existing code has a special case that always maps <stdint.h> integer types to corresponding Rust integer types, even if the C types are blocklisted. To match this special case behaviour, also treat these C <stdint.h> types as being eligible for derived Copy/Clone/Debug traits. Fixes rust-lang#2096
Update Item to hold a `clang::SourceLocation` and use this to allow blocklisting based on filename. The existing code has a special case that always maps <stdint.h> integer types to corresponding Rust integer types, even if the C types are blocklisted. To match this special case behaviour, also treat these C <stdint.h> types as being eligible for derived Copy/Clone/Debug traits. Fixes rust-lang#2096
Update Item to hold a `clang::SourceLocation` and use this to allow blocklisting based on filename. The existing code has a special case that always maps <stdint.h> integer types to corresponding Rust integer types, even if the C types are blocklisted. To match this special case behaviour, also treat these C <stdint.h> types as being eligible for derived Copy/Clone/Debug traits. Fixes rust-lang#2096
Update Item to hold a `clang::SourceLocation` and use this to allow blocklisting based on filename. The existing code has a special case that always maps <stdint.h> integer types to corresponding Rust integer types, even if the C types are blocklisted. To match this special case behaviour, also treat these C <stdint.h> types as being eligible for derived Copy/Clone/Debug traits. Fixes #2096
From #1200 (comment):
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 viabindgen
, 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?The text was updated successfully, but these errors were encountered: