Expand description
Generate Rust bindings for C and C++ libraries.
Provide a C/C++ header file, receive Rust FFI code to call into C/C++ functions and use types defined in the header.
See the Builder struct for usage.
See the Users Guide for additional documentation.
Modules§
- callbacks
 - A public API for more fine-grained customization of bindgen behavior.
 
Structs§
- Bindings
 - Generated Rust bindings.
 - Builder
 - Configure and generate Rust bindings for a C/C++ header.
 - Cargo
Callbacks  - A 
ParseCallbacksimplementation that will act on file includes by echoing a rerun-if-changed line and on env variable usage by echoing a rerun-if-env-changed line - Clang
Version  - Extracted Clang version data
 - Codegen
Config  - A type used to indicate which kind of items we have to generate.
 - Rust
Target  - Represents the version of the Rust language to target.
 
Enums§
- Abi
 - A valid rust ABI.
 - Alias
Variation  - Enum for how aliases should be translated.
 - Bindgen
Error  - Error type for rust-bindgen.
 - Enum
Variation  - A helper type that represents different enum variations.
 - Field
Visibility Kind  - What kind of visibility modifier should be used for a struct or field?
 - Formatter
 - Formatting tools that can be used to format the bindings
 - Macro
Type Variation  - Enum for the default type of macro constants.
 - NonCopy
Union Style  - Enum for how non-
Copyunions should be translated. - Rust
Edition  - Represents Rust Edition for the generated bindings
 
Constants§
- Cargo
Callbacks Deprecated  - Create a new 
CargoCallbacksvalue withCargoCallbacks::rerun_on_header_filesdisabled. - DEFAULT_
ANON_ FIELDS_ PREFIX  - Default prefix for the anon fields.
 - LATEST_
STABLE_ RUST  - Latest stable release of Rust that is supported by bindgen
 
Functions§
- builder
 - Construct a new 
Builder. - clang_
version  - Get the major and the minor semver numbers of Clang’s version