]>
Commit | Line | Data |
---|---|---|
b573c16d DB |
1 | # The language to output bindings in |
2 | # | |
3 | # possible values: "C", "C++" | |
4 | # | |
5 | # default: "C++" | |
6 | language = "C" | |
7 | ||
8 | ||
9 | # Options for wrapping the contents of the header: | |
10 | ||
11 | # An optional string of text to output at the beginning of the generated file | |
12 | # default: doesn't emit anything | |
13 | header = """/* Copyright (C) 2019 Open Information Security Foundation | |
14 | * | |
15 | * You can copy, redistribute or modify this Program under the terms of | |
16 | * the GNU General Public License version 2 as published by the Free | |
17 | * Software Foundation. | |
18 | * | |
19 | * This program is distributed in the hope that it will be useful, | |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | * GNU General Public License for more details. | |
23 | * | |
24 | * You should have received a copy of the GNU General Public License | |
25 | * version 2 along with this program; if not, write to the Free Software | |
26 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
27 | * 02110-1301, USA. | |
28 | */""" | |
29 | ||
30 | # An optional name to use as an include guard | |
31 | # default: doesn't emit an include guard | |
32 | include_guard = "__RUST_BINDINGS_GEN_H_" | |
33 | ||
34 | # An optional string of text to output between major sections of the generated | |
35 | # file as a warning against manual editing | |
36 | # | |
37 | # default: doesn't emit anything | |
38 | autogen_warning = "/* DO NOT EDIT This file is autogenerated by cbindgen. Don't modify this manually. */" | |
39 | ||
40 | # Whether to include a comment with the version of cbindgen used to generate the file | |
41 | # default: false | |
42 | include_version = true | |
43 | ||
44 | # A list of headers to #include (with quotes) | |
45 | # default: [] | |
f77fd0c0 | 46 | includes = [] |
b573c16d DB |
47 | |
48 | # The desired length of a line to use when formatting lines | |
49 | # default: 100 | |
50 | line_length = 80 | |
51 | ||
52 | # The amount of spaces to indent by | |
53 | # default: 2 | |
54 | tab_width = 4 | |
55 | ||
56 | # How the generated documentation should be commented. | |
57 | # | |
58 | # possible values: | |
59 | # * "c": /* like this */ | |
60 | # * "c99": // like this | |
61 | # * "c++": /// like this | |
62 | # * "doxy": like C, but with leading *'s on each line | |
63 | # * "auto": "c++" if that's the language, "doxy" otherwise | |
64 | # | |
65 | # default: "auto" | |
66 | documentation_style = "doxy" | |
67 | ||
68 | ||
69 | [export] | |
70 | # A list of additional items to always include in the generated bindings if they're | |
71 | # found but otherwise don't appear to be used by the public API. | |
72 | # | |
73 | # default: [] | |
6a70d6bb JI |
74 | include = [ |
75 | "AppLayerGetTxIterTuple", | |
22a2bee6 | 76 | "RdpState", |
6a70d6bb | 77 | "SIPState", |
a458a94d | 78 | "ModbusState", |
60bfbd43 | 79 | "CMark", |
6a70d6bb | 80 | ] |
b573c16d DB |
81 | |
82 | # A list of items to not include in the generated bindings | |
83 | # default: [] | |
84 | exclude = [ | |
85 | "AppLayerDecoderEvents", | |
0af9a3a5 | 86 | "AppLayerParserState", |
b573c16d DB |
87 | "CLuaState", |
88 | "DetectEngineState", | |
89 | "Flow", | |
90 | "FileContainer", | |
91 | "JsonT", | |
ecdf9f6b | 92 | "IKEState", |
93 | "IKETransaction", | |
b573c16d DB |
94 | "KRB5State", |
95 | "KRB5Transaction", | |
96 | "NTPState", | |
97 | "NTPTransaction", | |
98 | "SNMPState", | |
99 | "SNMPTransaction", | |
100 | "SuricataContext", | |
101 | "SuricataFileContext", | |
102 | "TFTPState", | |
942dd086 JI |
103 | "TFTPTransaction", |
104 | "free", | |
b573c16d DB |
105 | ] |
106 | ||
107 | # Types of items that we'll generate. If empty, then all types of item are emitted. | |
108 | # | |
109 | # possible items: (TODO: explain these in detail) | |
110 | # * "constants": | |
111 | # * "globals": | |
112 | # * "enums": | |
113 | # * "structs": | |
114 | # * "unions": | |
115 | # * "typedefs": | |
116 | # * "opaque": | |
117 | # * "functions": | |
118 | # | |
119 | # default: [] | |
6b2e7dde | 120 | item_types = ["enums","structs","opaque","functions"] |
b573c16d DB |
121 | |
122 | # Whether applying rules in export.rename prevents export.prefix from applying. | |
123 | # | |
124 | # e.g. given this toml: | |
125 | # | |
126 | # [export] | |
127 | # prefix = "capi_" | |
128 | [export.rename] | |
b573c16d DB |
129 | "DNSTransaction" = "RSDNSTransaction" |
130 | "JsonT" = "json_t" | |
131 | "CLuaState" = "lua_State" | |
132 | ||
133 | # | |
134 | # You get the following results: | |
135 | # | |
136 | # renaming_overrides_prefixing = true: | |
137 | # "MyType" => "my_cool_type" | |
138 | # | |
139 | # renaming_overrides_prefixing = false: | |
140 | # "MyType => capi_my_cool_type" | |
141 | # | |
142 | # default: false | |
143 | renaming_overrides_prefixing = "true" | |
144 | ||
145 | [parse] | |
146 | # A black list of crate names that are not allowed to be parsed. | |
147 | # default: [] | |
148 | exclude = ["libc"] | |
149 | ||
150 | [parse.expand] | |
151 | # A list of feature names that should be used when running `cargo expand`. This | |
152 | # combines with `default_features` like in your `Cargo.toml`. Note that the features | |
153 | # listed here are features for the current crate being built, *not* the crates | |
154 | # being expanded. The crate's `Cargo.toml` must take care of enabling the | |
155 | # appropriate features in its dependencies | |
156 | # | |
157 | # default: [] | |
158 | features = ["cbindgen"] |