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.
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.