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