Summary Introduction Requirements Library Usage with build.rs Tutorial Add bindgen as a Build Dependency Create a wrapper.h Header Create a build.rs File Include the Generated Bindings in src/lib.rs Write a Sanity Test Publish Your Crate! Bindings for non-system libraries Command Line Usage Customizing the Generated Bindings Allowlisting Blocklisting Treating a Type as an Opaque Blob of Bytes Replacing One Type with Another Preventing the Derivation of Copy and Clone Preventing the Derivation of Debug Preventing the Derivation of Default Annotating types with #[must-use] Field visibility Code formatting Libloading Generating Bindings to C++ Generating Bindings to Objective-c Using Unions Using Bitfields Using Flexible Array Members FAQ