#compdef bindgen autoload -U is-at-least _bindgen() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ '--depfile=[Path to write depfile to]:DEPFILE: ' \ '--default-enum-style=[The default STYLE of code used to generate enums]:STYLE: ' \ '*--bitfield-enum=[Mark any enum whose name matches REGEX as a set of bitfield flags]:REGEX: ' \ '*--newtype-enum=[Mark any enum whose name matches REGEX as a newtype]:REGEX: ' \ '*--newtype-global-enum=[Mark any enum whose name matches REGEX as a global newtype]:REGEX: ' \ '*--rustified-enum=[Mark any enum whose name matches REGEX as a Rust enum]:REGEX: ' \ '*--rustified-non-exhaustive-enum=[Mark any enum whose name matches REGEX as a non-exhaustive Rust enum]:REGEX: ' \ '*--constified-enum=[Mark any enum whose name matches REGEX as a series of constants]:REGEX: ' \ '*--constified-enum-module=[Mark any enum whose name matches REGEX as a module of constants]:REGEX: ' \ '--default-macro-constant-type=[The default signed/unsigned TYPE for C macro constants]:TYPE: ' \ '--default-alias-style=[The default STYLE of code used to generate typedefs]:STYLE: ' \ '*--normal-alias=[Mark any typedef alias whose name matches REGEX to use normal type aliasing]:REGEX: ' \ '*--new-type-alias=[Mark any typedef alias whose name matches REGEX to have a new type generated for it]:REGEX: ' \ '*--new-type-alias-deref=[Mark any typedef alias whose name matches REGEX to have a new type with Deref and DerefMut to the inner type]:REGEX: ' \ '--default-non-copy-union-style=[The default STYLE of code used to generate unions with non-Copy members. Note that ManuallyDrop was first stabilized in Rust 1.20.0]:STYLE: ' \ '*--bindgen-wrapper-union=[Mark any union whose name matches REGEX and who has a non-Copy member to use a bindgen-generated wrapper for fields]:REGEX: ' \ '*--manually-drop-union=[Mark any union whose name matches REGEX and who has a non-Copy member to use ManuallyDrop (stabilized in Rust 1.20.0) for fields]:REGEX: ' \ '*--blocklist-type=[Mark TYPE as hidden]:TYPE: ' \ '*--blocklist-function=[Mark FUNCTION as hidden]:FUNCTION: ' \ '*--blocklist-item=[Mark ITEM as hidden]:ITEM: ' \ '*--blocklist-file=[Mark FILE as hidden]:FILE: ' \ '*--blocklist-var=[Mark VAR as hidden]:VAR: ' \ '--ctypes-prefix=[Use the given PREFIX before raw types instead of ::std::os::raw]:PREFIX: ' \ '--anon-fields-prefix=[Use the given PREFIX for anonymous fields]:PREFIX: ' \ '--emit-ir-graphviz=[Dump a graphviz dot file to PATH]:PATH: ' \ '--generate=[Generate only given items, split by commas. Valid values are `functions`,`types`, `vars`, `methods`, `constructors` and `destructors`]:GENERATE: ' \ '*--opaque-type=[Mark TYPE as opaque]:TYPE: ' \ '-o+[Write Rust bindings to OUTPUT]:OUTPUT: ' \ '--output=[Write Rust bindings to OUTPUT]:OUTPUT: ' \ '*--raw-line=[Add a raw line of Rust code at the beginning of output]:RAW_LINE: ' \ '*--module-raw-line=[Add a RAW_LINE of Rust code to a given module with name MODULE_NAME]:MODULE_NAME: :MODULE_NAME: ' \ '--rust-target=[Version of the Rust compiler to target. Any Rust version after 1.33.0 is supported. Defaults to 1.82.0.]:RUST_TARGET: ' \ '--rust-edition=[Rust edition to target. Defaults to the latest edition supported by the chosen Rust target. Possible values: (2018|2021|2024). ]:EDITION: ' \ '*--allowlist-function=[Allowlist all the free-standing functions matching REGEX. Other non-allowlisted functions will not be generated]:REGEX: ' \ '*--allowlist-type=[Only generate types matching REGEX. Other non-allowlisted types will not be generated]:REGEX: ' \ '*--allowlist-var=[Allowlist all the free-standing variables matching REGEX. Other non-allowlisted variables will not be generated]:REGEX: ' \ '*--allowlist-file=[Allowlist all contents of PATH]:PATH: ' \ '*--allowlist-item=[Allowlist all items matching REGEX. Other non-allowlisted items will not be generated]:REGEX: ' \ '(--no-rustfmt-bindings)--formatter=[Which FORMATTER should be used for the bindings]:FORMATTER: ' \ '(--no-rustfmt-bindings)--rustfmt-configuration-file=[The absolute PATH to the rustfmt configuration file. The configuration file will be used for formatting the bindings. This parameter sets `formatter` to `rustfmt`]:PATH:_files' \ '*--no-partialeq=[Avoid deriving PartialEq for types matching REGEX]:REGEX: ' \ '*--no-copy=[Avoid deriving Copy and Clone for types matching REGEX]:REGEX: ' \ '*--no-debug=[Avoid deriving Debug for types matching REGEX]:REGEX: ' \ '*--no-default=[Avoid deriving/implementing Default for types matching REGEX]:REGEX: ' \ '*--no-hash=[Avoid deriving Hash for types matching REGEX]:REGEX: ' \ '*--must-use-type=[Add `#\[must_use\]` annotation to types matching REGEX]:REGEX: ' \ '--wasm-import-module-name=[The NAME to be used in a #\[link(wasm_import_module = ...)\] statement]:NAME: ' \ '--dynamic-loading=[Use dynamic loading mode with the given library NAME]:NAME: ' \ '--prefix-link-name=[Prefix the name of exported symbols]:PREFIX_LINK_NAME: ' \ '*--override-abi=[Overrides the ABI of functions matching REGEX. The OVERRIDE value must be of the shape REGEX=ABI where ABI can be one of C, stdcall, efiapi, fastcall, thiscall, aapcs, win64 or C-unwind<.>]:OVERRIDE: ' \ '--clang-macro-fallback-build-dir=[Set path for temporary files generated by fallback for clang macro parsing]:CLANG_MACRO_FALLBACK_BUILD_DIR:_files' \ '*--with-derive-custom=[Derive custom traits on any kind of type. The CUSTOM value must be of the shape REGEX=DERIVE where DERIVE is a coma-separated list of derive macros]:CUSTOM: ' \ '*--with-derive-custom-struct=[Derive custom traits on a `struct`. The CUSTOM value must be of the shape REGEX=DERIVE where DERIVE is a coma-separated list of derive macros]:CUSTOM: ' \ '*--with-derive-custom-enum=[Derive custom traits on an `enum`. The CUSTOM value must be of the shape REGEX=DERIVE where DERIVE is a coma-separated list of derive macros]:CUSTOM: ' \ '*--with-derive-custom-union=[Derive custom traits on a `union`. The CUSTOM value must be of the shape REGEX=DERIVE where DERIVE is a coma-separated list of derive macros]:CUSTOM: ' \ '*--with-attribute-custom=[Add custom attributes on any kind of type. The CUSTOM value must be of the shape REGEX=ATTRIBUTE where ATTRIBUTE is a coma-separated list of attributes]:CUSTOM: ' \ '*--with-attribute-custom-struct=[Add custom attributes on a `struct`. The CUSTOM value must be of the shape REGEX=ATTRIBUTE where ATTRIBUTE is a coma-separated list of attributes]:CUSTOM: ' \ '*--with-attribute-custom-enum=[Add custom attributes on an `enum`. The CUSTOM value must be of the shape REGEX=ATTRIBUTE where ATTRIBUTE is a coma-separated list of attributes]:CUSTOM: ' \ '*--with-attribute-custom-union=[Add custom attributes on a `union`. The CUSTOM value must be of the shape REGEX=ATTRIBUTE where ATTRIBUTE is a coma-separated list of attributes]:CUSTOM: ' \ '--wrap-static-fns-path=[Sets the PATH for the source file that must be created due to the presence of `static` and `static inline` functions]:PATH:_files' \ '--wrap-static-fns-suffix=[Sets the SUFFIX added to the extern wrapper functions generated for `static` and `static inline` functions]:SUFFIX: ' \ '--default-visibility=[Set the default VISIBILITY of fields, including bitfields and accessor methods for bitfields. This flag is ignored if the `--respect-cxx-access-specs` flag is used]:VISIBILITY: ' \ '--generate-shell-completions=[Generates completions for the specified SHELL, sends them to `stdout` and exits]:SHELL:(bash elvish fish powershell zsh)' \ '--no-layout-tests[Avoid generating layout tests for any type]' \ '--no-derive-copy[Avoid deriving Copy on any type]' \ '--no-derive-debug[Avoid deriving Debug on any type]' \ '--no-derive-default[Avoid deriving Default on any type]' \ '--impl-debug[Create a Debug implementation if it cannot be derived automatically]' \ '--impl-partialeq[Create a PartialEq implementation if it cannot be derived automatically]' \ '--with-derive-default[Derive Default on any type]' \ '--with-derive-hash[Derive Hash on any type]' \ '--with-derive-partialeq[Derive PartialEq on any type]' \ '--with-derive-partialord[Derive PartialOrd on any type]' \ '--with-derive-eq[Derive Eq on any type]' \ '--with-derive-ord[Derive Ord on any type]' \ '--no-doc-comments[Avoid including doc comments in the output, see: ]' \ '--no-recursive-allowlist[Disable allowlisting types recursively. This will cause bindgen to emit Rust code that won'\''t compile! See the `bindgen::Builder::allowlist_recursively` method'\''s documentation for details]' \ '--objc-extern-crate[Use extern crate instead of use for objc]' \ '--generate-block[Generate block signatures instead of void pointers]' \ '--generate-cstr[Generate string constants as `&CStr` instead of `&\[u8\]`]' \ '--block-extern-crate[Use extern crate instead of use for block]' \ '--distrust-clang-mangling[Do not trust the libclang-provided mangling]' \ '--builtins[Output bindings for builtin definitions, e.g. __builtin_va_list]' \ '--time-phases[Time the different bindgen phases and print to stderr]' \ '--emit-clang-ast[Output the Clang AST for debugging purposes]' \ '--emit-ir[Output our internal IR for debugging purposes]' \ '--enable-cxx-namespaces[Enable support for C++ namespaces]' \ '--disable-name-namespacing[Disable namespacing via mangling, causing bindgen to generate names like `Baz` instead of `foo_bar_Baz` for an input name `foo::bar::Baz`]' \ '--disable-nested-struct-naming[Disable nested struct naming, causing bindgen to generate names like `bar` instead of `foo_bar` for a nested definition `struct foo { struct bar { } b; };`]' \ '--disable-untagged-union[Disable support for native Rust unions]' \ '--disable-header-comment[Suppress insertion of bindgen'\''s version identifier into generated bindings]' \ '--ignore-functions[Do not generate bindings for functions or methods. This is useful when you only care about struct layouts]' \ '--ignore-methods[Do not generate bindings for methods]' \ '--no-convert-floats[Do not automatically convert floats to f32/f64]' \ '--no-prepend-enum-name[Do not prepend the enum name to constant or newtype variants]' \ '--no-include-path-detection[Do not try to detect default include paths]' \ '--fit-macro-constant-types[Try to fit macro constants into types smaller than u32/i32]' \ '--use-core[Use types from Rust core instead of std]' \ '--conservative-inline-namespaces[Conservatively generate inline namespaces to avoid name conflicts]' \ '--generate-inline-functions[Generate inline functions]' \ '--verbose[Print verbose error messages]' \ '--dump-preprocessed-input[Preprocess and dump the input header files to disk. Useful when debugging bindgen, using C-Reduce, or when filing issues. The resulting file will be named something like `__bindgen.i` or `__bindgen.ii`]' \ '--no-record-matches[Do not record matching items in the regex sets. This disables reporting of unused items]' \ '--no-size_t-is-usize[Do not bind size_t as usize (useful on platforms where those types are incompatible)]' \ '--no-rustfmt-bindings[Do not format the generated bindings with rustfmt. This option is deprecated, please use `--formatter=none` instead]' \ '--enable-function-attribute-detection[Enables detecting unexposed attributes in functions (slow). Used to generate `#\[must_use\]` annotations]' \ '--use-array-pointers-in-arguments[Use `*const \[T; size\]` instead of `*const T` for C arrays]' \ '--dynamic-link-require-all[Require successful linkage to all functions in the library]' \ '--respect-cxx-access-specs[Makes generated bindings `pub` only for items if the items are publicly accessible in C++]' \ '--translate-enum-integer-types[Always translate enum integer types to native Rust integer types]' \ '--c-naming[Generate types with C style naming]' \ '--explicit-padding[Always output explicit padding fields]' \ '--use-specific-virtual-function-receiver[Always be specific about the '\''receiver'\'' of a virtual function]' \ '--use-distinct-char16-t[Use distinct char16_t]' \ '--represent-cxx-operators[Output C++ overloaded operators]' \ '--vtable-generation[Enables generation of vtable functions]' \ '--sort-semantically[Enables sorting of code generation in a predefined manner]' \ '--merge-extern-blocks[Deduplicates extern blocks]' \ '--wrap-unsafe-ops[Wrap unsafe operations in unsafe blocks]' \ '--clang-macro-fallback[Enable fallback for clang macro parsing]' \ '--flexarray-dst[Use DSTs to represent structures with flexible array members]' \ '--wrap-static-fns[Generate wrappers for `static` and `static inline` functions]' \ '--generate-deleted-functions[Whether to generate C++ functions marked with "=delete" even though they can'\''t be called]' \ '--generate-pure-virtual-functions[Whether to generate C++ "pure virtual" functions even though they can'\''t be called]' \ '--generate-private-functions[Whether to generate C++ private functions even though they can'\''t be called]' \ '--emit-diagnostics[Whether to emit diagnostics or not]' \ '--experimental[Enables experimental features]' \ '-V[Prints the version, and exits]' \ '--version[Prints the version, and exits]' \ '-h[Print help]' \ '--help[Print help]' \ '::header -- C or C++ header file:' \ '*::clang_args -- Arguments to be passed straight through to clang:' \ && ret=0 } (( $+functions[_bindgen_commands] )) || _bindgen_commands() { local commands; commands=() _describe -t commands 'bindgen commands' commands "$@" } if [ "$funcstack[1]" = "_bindgen" ]; then _bindgen "$@" else compdef _bindgen bindgen fi