- 1. Introduction
- 2. Requirements
- 3. Library Usage with build.rs
- 3.1. Tutorial
- 3.1.1. Add bindgen as a Build Dependency
- 3.1.2. Create a wrapper.h Header
- 3.1.3. Create a build.rs File
- 3.1.4. Include the Generated Bindings in src/lib.rs
- 3.1.5. Write a Sanity Test
- 3.1.6. Publish Your Crate!
- 3.2. Bindings for non-system libraries
- 4. Command Line Usage
- 5. Customizing the Generated Bindings
- 5.1. Allowlisting
- 5.2. Blocklisting
- 5.3. Treating a Type as an Opaque Blob of Bytes
- 5.4. Replacing One Type with Another
- 5.5. Preventing the Derivation of Copy and Clone
- 5.6. Preventing the Derivation of Debug
- 5.7. Preventing the Derivation of Default
- 5.8. Annotating types with #[must-use]
- 5.9. Field visibility
- 5.10. Code formatting
- 6. Generating Bindings to C++
- 7. Generating Bindings to Objective-c
- 8. Using Unions
- 9. Using Bitfields
- 10. Using Flexible Array Members
- 11. FAQ