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!
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
Generating Bindings to C++
Generating Bindings to Objective-c
Using Unions
Using Bitfields
FAQ