]> git.ipfire.org Git - people/ms/suricata.git/blob - rust/cbindgen.toml
jsonbuilder: new module for generating json
[people/ms/suricata.git] / rust / cbindgen.toml
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: []
46 includes = ["rust.h"]
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: []
74 include = ["AppLayerGetTxIterTuple"]
75
76 # A list of items to not include in the generated bindings
77 # default: []
78 exclude = [
79 "AppLayerDecoderEvents",
80 "AppLayerParserState",
81 "CLuaState",
82 "DetectEngineState",
83 "Flow",
84 "FileContainer",
85 "JsonT",
86 "IKEV2State",
87 "IKEV2Transaction",
88 "KRB5State",
89 "KRB5Transaction",
90 "NTPState",
91 "NTPTransaction",
92 "SNMPState",
93 "SNMPTransaction",
94 "SuricataContext",
95 "SuricataFileContext",
96 "TFTPState",
97 "TFTPTransaction",
98 "free",
99 ]
100
101 # Types of items that we'll generate. If empty, then all types of item are emitted.
102 #
103 # possible items: (TODO: explain these in detail)
104 # * "constants":
105 # * "globals":
106 # * "enums":
107 # * "structs":
108 # * "unions":
109 # * "typedefs":
110 # * "opaque":
111 # * "functions":
112 #
113 # default: []
114 item_types = ["enums","structs","opaque","functions"]
115
116 # Whether applying rules in export.rename prevents export.prefix from applying.
117 #
118 # e.g. given this toml:
119 #
120 # [export]
121 # prefix = "capi_"
122 [export.rename]
123 "DNSTransaction" = "RSDNSTransaction"
124 "JsonT" = "json_t"
125 "CLuaState" = "lua_State"
126
127 #
128 # You get the following results:
129 #
130 # renaming_overrides_prefixing = true:
131 # "MyType" => "my_cool_type"
132 #
133 # renaming_overrides_prefixing = false:
134 # "MyType => capi_my_cool_type"
135 #
136 # default: false
137 renaming_overrides_prefixing = "true"
138
139 [parse]
140 # A black list of crate names that are not allowed to be parsed.
141 # default: []
142 exclude = ["libc"]
143
144 [parse.expand]
145 # A list of feature names that should be used when running `cargo expand`. This
146 # combines with `default_features` like in your `Cargo.toml`. Note that the features
147 # listed here are features for the current crate being built, *not* the crates
148 # being expanded. The crate's `Cargo.toml` must take care of enabling the
149 # appropriate features in its dependencies
150 #
151 # default: []
152 features = ["cbindgen"]