-
Notifications
You must be signed in to change notification settings - Fork 738
Support taking options from a file #2508
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
Hi @davidben! I have some points I'd like to discuss about your proposal: The first one has to do with the composition and format of such configuration: If you want to avoid repeat parameters I suspect you'd want to have a "global" configuration file and then some platform-specific configuration files. So I'd imagine that you want bindgen to be able to not only read a configuration file but to be able to read several of them and combine them in a predefined manner. The second thing is, I understand what you mean about Finally, Is there any reason why using |
Somewhat related: #1898 |
#1898 would work perfectly for this. We can probably merge this issue into that one. As for the other questions, I probably skipped some steps and should have filed an intermediary bug. 😄 First, why not bindgen as a library is that it does not interact well with other build systems. For my project, we need to support builds other than cargo, e.g. Android. Those often have hermeticity or cross-language requirements, so they cannot use To that end, the The connection between That said, on reflection, I think |
(This is a feature request.)
Bindgen has a lot of parameters that take regexes.
--allowlist-file
, in particular, takes a regex with file paths. Because bindgen seems to not properly normalize/
and\
on Windows, and instead punts this basic cross-platform operation to the user, those regexes get quite complex. Escaping and quoting such things across build systems and platforms is, sadly, a nightmare. (Many build tools pass their inputs through the shell. It's a huge mess.)Additionally, projects that need to support multiple build systems have to repeat parameters in multiple ways. Right now, a project's expected bindgen flags needs to be repeated in every build sytem.
bindgen should support some kind of config file that allows passing these options in a more defined manner.
The text was updated successfully, but these errors were encountered: