1# See https://github.com/eqrion/cbindgen/blob/master/docs.md#cbindgentoml 2# for detailed documentation of every option here. 3 4 5 6language = "C" 7 8 9 10############## Options for Wrapping the Contents of the Header ################# 11 12# header = "/* Text to put at the beginning of the generated file. Probably a license. */" 13# trailer = "/* Text to put at the end of the generated file */" 14# include_guard = "my_bindings_h" 15# pragma_once = true 16autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */" 17include_version = false 18# namespace = "my_namespace" 19namespaces = [] 20using_namespaces = [] 21sys_includes = [] 22includes = [] 23no_includes = false 24after_includes = "" 25 26 27 28 29############################ Code Style Options ################################ 30 31braces = "SameLine" 32line_length = 100 33tab_width = 2 34documentation = true 35documentation_style = "auto" 36documentation_length = "full" 37line_endings = "LF" # also "CR", "CRLF", "Native" 38 39 40 41 42############################# Codegen Options ################################## 43 44style = "both" 45sort_by = "Name" # default for `fn.sort_by` and `const.sort_by` 46usize_is_size_t = true 47 48 49 50[defines] 51# "target_os = freebsd" = "DEFINE_FREEBSD" 52# "feature = serde" = "DEFINE_SERDE" 53 54 55 56[export] 57include = [] 58exclude = [] 59# prefix = "CAPI_" 60item_types = [] 61renaming_overrides_prefixing = false 62 63 64 65[export.rename] 66 67 68 69[export.body] 70 71 72[export.mangle] 73 74 75[fn] 76rename_args = "None" 77# must_use = "MUST_USE_FUNC" 78# no_return = "NO_RETURN" 79# prefix = "START_FUNC" 80# postfix = "END_FUNC" 81args = "auto" 82sort_by = "Name" 83 84 85 86 87[struct] 88rename_fields = "None" 89# must_use = "MUST_USE_STRUCT" 90derive_constructor = false 91derive_eq = false 92derive_neq = false 93derive_lt = false 94derive_lte = false 95derive_gt = false 96derive_gte = false 97 98 99 100 101[enum] 102rename_variants = "None" 103# must_use = "MUST_USE_ENUM" 104add_sentinel = false 105prefix_with_name = false 106derive_helper_methods = false 107derive_const_casts = false 108derive_mut_casts = false 109# cast_assert_name = "ASSERT" 110derive_tagged_enum_destructor = false 111derive_tagged_enum_copy_constructor = false 112enum_class = true 113private_default_tagged_enum_constructor = false 114 115 116 117 118[const] 119allow_static_const = true 120allow_constexpr = false 121sort_by = "Name" 122 123 124 125 126[macro_expansion] 127bitflags = false 128 129 130 131 132 133 134############## Options for How Your Rust library Should Be Parsed ############## 135 136[parse] 137parse_deps = false 138# include = [] 139exclude = [] 140clean = false 141extra_bindings = [] 142 143 144 145[parse.expand] 146crates = [] 147all_features = false 148default_features = true 149features = []