Struct libbindgen::BindgenOptions
[−]
[src]
pub struct BindgenOptions { pub hidden_types: HashSet<String>, pub opaque_types: HashSet<String>, pub whitelisted_types: RegexSet, pub whitelisted_functions: RegexSet, pub whitelisted_vars: RegexSet, pub bitfield_enums: RegexSet, pub builtins: bool, pub links: Vec<(String, LinkType)>, pub emit_ast: bool, pub emit_ir: bool, pub enable_cxx_namespaces: bool, pub disable_name_namespacing: bool, pub derive_debug: bool, pub unstable_rust: bool, pub use_core: bool, pub ctypes_prefix: Option<String>, pub namespaced_constants: bool, pub msvc_mangling: bool, pub convert_floats: bool, pub raw_lines: Vec<String>, pub clang_args: Vec<String>, pub input_header: Option<String>, pub dummy_uses: Option<String>, pub type_chooser: Option<Box<TypeChooser>>, pub codegen_config: CodegenConfig, }
Configuration options for generated bindings.
Deprecated: use a Builder
instead.
Fields
The set of types that have been blacklisted and should not appear anywhere in the generated code.
opaque_types: HashSet<String>
The set of types that should be treated as opaque structures in the generated code.
whitelisted_types: RegexSet
The set of types that we should have bindings for in the generated code.
This includes all types transitively reachable from any type in this set. One might think of whitelisted types/vars/functions as GC roots, and the generated Rust code as including everything that gets marked.
whitelisted_functions: RegexSet
Whitelisted functions. See docs for whitelisted_types
for more.
whitelisted_vars: RegexSet
Whitelisted variables. See docs for whitelisted_types
for more.
bitfield_enums: RegexSet
The enum patterns to mark an enum as bitfield.
builtins: bool
Whether we should generate builtins or not.
links: Vec<(String, LinkType)>
The set of libraries we should link in the generated Rust code.
emit_ast: bool
True if we should dump the Clang AST for debugging purposes.
emit_ir: bool
True if we should dump our internal IR for debugging purposes.
enable_cxx_namespaces: bool
True if we should emulate C++ namespaces with Rust modules in the generated bindings.
disable_name_namespacing: bool
True if we should avoid mangling names with namespaces.
derive_debug: bool
True if we shold derive Debug trait implementations for C/C++ structures and types.
unstable_rust: bool
True if we can use unstable Rust code in the bindings, false if we cannot.
use_core: bool
True if we should avoid using libstd to use libcore instead.
ctypes_prefix: Option<String>
An optional prefix for the "raw" types, like c_int
, c_void
...
namespaced_constants: bool
True if we should generate constant names that are directly under namespaces.
msvc_mangling: bool
True if we should use MSVC name mangling rules.
convert_floats: bool
Whether we should convert float types to f32/f64 types.
raw_lines: Vec<String>
The set of raw lines to prepend to the generated Rust code.
clang_args: Vec<String>
The set of arguments to pass straight through to Clang.
input_header: Option<String>
The input header file.
dummy_uses: Option<String>
Generate a dummy C/C++ file that includes the header and has dummy uses
of all types defined therein. See the uses
module for more.
type_chooser: Option<Box<TypeChooser>>
A user-provided type chooser to allow customizing different kinds of situations.
codegen_config: CodegenConfig
Which kind of items should we generate? By default, we'll generate all of them.
Trait Implementations
impl Debug for BindgenOptions
[src]
impl Default for BindgenOptions
[src]
fn default() -> BindgenOptions
Returns the "default value" for a type. Read more