Replies: 2 comments 4 replies
-
Thanks for the feedback!
We do try to generate documentation, see the documentation for the We don't try to do any fancy doxygen -> rustdoc conversion though. Not opposed to add that.
That we don't currently support. No reason it can't be added, but hadn't come up before afaict.
Yeah, so that's trickier. I don't think we want to make the bindgen crate include all of LLVM and build it, or update a pre-built version to crates.io for all platforms. We have a Alternatively you can bundle LLVM and point bindgen at it with
We need to deal with C++ which can be a lot more complicated...
You can filter with the
See above. Does that not work for your use case? If not it'd be good to know why. |
Beta Was this translation helpful? Give feedback.
-
👋 I'm here to drop my 2 cents about certain topics Regarding the allowlist/blocklist API: yeah I get it, regexes aren't the prettiest, but, as you mentioned, the lack of modularity in C leaves us with few choices to filter items. C++ is less prone to the so it could be reasonable to have a more structured API there but I'm not sure how widespread its use would be. Regarding the prebuilt clang, I feel this is a discussion we've had in the past without a clear answer so it might be worth it to open an issue/discussion for it. I think it has a legitimate use case but it also brings the question of which libclang version should be used by default. |
Beta Was this translation helpful? Give feedback.
-
I have ended up writing manual bindings in a project where it feels like bindgen should have been the right tool, because there were too many things I did not like about (my understanding of) how bindgen works.
I am not sure which of these aspects of bindgen are conscious design choices, which are involuntary limitations that would be worth fixing someday, and which are simple misunderstandings from my part (not actual bindgen limitations, can be overcome by someone who understands the library more than my quick reading of the manual + experimentation with the CLI allowed).
So here are my notes in the hope that they will be useful to you:
-sys
crates that were autogenerated using bindgen because they are fully undocumented, which makes me constantly round trip between the crate and underlying C lib documentation. In my ideal world, bindgen would be able to translate doxygen into rustdoc. The translation does not have to be very good to be a huge improvement over what we have right now, e.g. it would already be good to only parse the markdown part and leave uninterpreted doxygen directives around.libclang
dependency on my users, and I'm binding a library whose headers will vary from one system to another so baking a pre-generated binding into my repository is not an option. In my ideal world, bindgen would provide some optional crate feature where it brings its own libclang binary (possibly by leveraging some existing, well-respected source of LLVM binary releases).#include <something.h>
with angle brackets, which are conventionally almost always external dependencies of the library of interest whose declarations should not end up in the present binding but in a separate binding for that external dependency.Beta Was this translation helpful? Give feedback.
All reactions