Skip to content
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

Allow adding extra documentation to bindgen-generated entities #2758

Open
HadrienG2 opened this issue Feb 12, 2024 · 1 comment
Open

Allow adding extra documentation to bindgen-generated entities #2758

HadrienG2 opened this issue Feb 12, 2024 · 1 comment

Comments

@HadrienG2
Copy link

C libraries are not always very careful about documenting their safety requirements. But unsafe rust functions are expected to document in which circumstances they are safe to use. To resolve this impedance mismatch without huge upstream doc contributions, which may be rejected, it would be nice if one could append manually written # Safety sections to bindgen's autogenerated function docs. This could take the form of a HashMap from C function name to safety docs.

@HadrienG2 HadrienG2 changed the title Allow adding extra lines to a type's autogenerated documentation Allow adding extra documentation to bindgen-generated entities Feb 12, 2024
@pvdrz
Copy link
Contributor

pvdrz commented Apr 3, 2024

This could be seen as a particular case of #2739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants