Expand description
Library providing functions to assist with parsing and translating ‘#define’ macro definitions from C header files to corresponding Rust code for use with bindings to external libraries.
Structs§
- CMacro
- Macro definition parsed from a C header file
- Const
Decl - Attributes for a Rust constant definition
Enums§
- Translate
Action - Specifies a transformation from a C macro definition to Rust code
Functions§
- extract_
macros - Parse the source for a C header and extract a list of macro definitions
- generate_
rust_ src - Generates Rust source based on a set of C macro definitions and a translation function which specifies how to map each macro to a corresponding Rust type
- guess_
type - Guess a suitable constant type for a macro based on the body of the macro
- translate_
macro - Guesses a suitable translation from a C macro definition to a Rust representation.