Customizing the Generated Bindings - The bindgen User Guide
Description: `bindgen` automatically generates Rust FFI bindings to C and C++ libraries.

## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Customizing the Generated Bindings

The translation of classes, structs, enums, and typedefs can be adjusted in a few ways:

1. By using the `bindgen::Builder`’s configuration methods, when using `bindgen` as a library.

2. By passing extra flags and options to the `bindgen` executable.

3. By adding an annotation comment to the C/C++ source code. Annotations are specially formatted HTML tags inside doxygen style comments:

   - For single line comments:

         /// <div rustbindgen></div>

   - For multi-line comments:

         /**
          * <div rustbindgen></div>
          */

We’ll leave the nitty-gritty details to the docs.rs API reference and `bindgen --help`, but provide higher level concept documentation here.