Crate bindgen[][src]

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.

Macros

extra_assert

Simple macro that forwards to assert! when using testing_only_extra_assertions.

extra_assert_eq

Simple macro that forwards to assert_eq! when using testing_only_extra_assertions.

Structs

Bindings

Generated Rust bindings.

Builder

Configure and generate Rust bindings for a C/C++ header.

CargoCallbacks

A ParseCallbacks implementation that will act on file includes by echoing a rerun-if-changed line

ClangVersion

Extracted Clang version data

CodegenConfig

A type used to indicate which kind of items we have to generate.

Enums

AliasVariation

Enum for how aliases should be translated.

EnumVariation

A helper type that represents different enum variations.

MacroTypeVariation

Enum for the default type of macro constants.

RustTarget

Represents the version of the Rust language to target.

Constants

DEFAULT_ANON_FIELDS_PREFIX

Default prefix for the anon fields.

LATEST_STABLE_RUST

Latest stable release of Rust

Statics

RUST_TARGET_STRINGS

Strings of allowed RustTarget values

Functions

builder

Construct a new Builder.

clang_version

Get the major and the minor semver numbers of Clang’s version