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