123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- # The language to output bindings in
- #
- # possible values: "C", "C++"
- #
- # default: "C++"
- language = "C"
- # Options for wrapping the contents of the header:
- # An optional string of text to output at the beginning of the generated file
- # default: doesn't emit anything
- header = """/* Copyright (C) 2019 Open Information Security Foundation
- *
- * You can copy, redistribute or modify this Program under the terms of
- * the GNU General Public License version 2 as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */"""
- # An optional name to use as an include guard
- # default: doesn't emit an include guard
- include_guard = "__RUST_BINDINGS_GEN_H_"
- # An optional string of text to output between major sections of the generated
- # file as a warning against manual editing
- #
- # default: doesn't emit anything
- autogen_warning = "/* DO NOT EDIT This file is autogenerated by cbindgen. Don't modify this manually. */"
- # Whether to include a comment with the version of cbindgen used to generate the file
- # default: false
- include_version = true
- # A list of headers to #include (with quotes)
- # default: []
- includes = []
- # The desired length of a line to use when formatting lines
- # default: 100
- line_length = 80
- # The amount of spaces to indent by
- # default: 2
- tab_width = 4
- # How the generated documentation should be commented.
- #
- # possible values:
- # * "c": /* like this */
- # * "c99": // like this
- # * "c++": /// like this
- # * "doxy": like C, but with leading *'s on each line
- # * "auto": "c++" if that's the language, "doxy" otherwise
- #
- # default: "auto"
- documentation_style = "doxy"
- [export]
- # A list of additional items to always include in the generated bindings if they're
- # found but otherwise don't appear to be used by the public API.
- #
- # default: []
- include = [
- "StreamSlice",
- "AppLayerStateData",
- "AppLayerGetTxIterTuple",
- "RdpState",
- "SIPState",
- "ModbusState",
- "CMark",
- "QuicState",
- "QuicTransaction"
- ]
- # A list of items to not include in the generated bindings
- # default: []
- exclude = [
- "AppLayerDecoderEvents",
- "AppLayerParserState",
- "CLuaState",
- "DetectEngineState",
- "Flow",
- "StreamingBufferConfig",
- "HttpRangeContainerBlock",
- "FileContainer",
- "JsonT",
- "IKEState",
- "IKETransaction",
- "KRB5State",
- "KRB5Transaction",
- "NTPState",
- "NTPTransaction",
- "SNMPState",
- "SNMPTransaction",
- "SuricataContext",
- "SuricataFileContext",
- "TFTPState",
- "TFTPTransaction",
- "free",
- "IPPROTO_TCP",
- "IPPROTO_UDP",
- "SRepCatGetByShortname",
- ]
- # Types of items that we'll generate. If empty, then all types of item are emitted.
- #
- # possible items: (TODO: explain these in detail)
- # * "constants":
- # * "globals":
- # * "enums":
- # * "structs":
- # * "unions":
- # * "typedefs":
- # * "opaque":
- # * "functions":
- #
- # default: []
- item_types = ["enums","structs","opaque","functions","constants"]
- # Whether applying rules in export.rename prevents export.prefix from applying.
- #
- # e.g. given this toml:
- #
- # [export]
- # prefix = "capi_"
- [export.rename]
- "DNSTransaction" = "RSDNSTransaction"
- "JsonT" = "json_t"
- "CLuaState" = "lua_State"
- #
- # You get the following results:
- #
- # renaming_overrides_prefixing = true:
- # "MyType" => "my_cool_type"
- #
- # renaming_overrides_prefixing = false:
- # "MyType => capi_my_cool_type"
- #
- # default: false
- renaming_overrides_prefixing = "true"
- [parse]
- # A black list of crate names that are not allowed to be parsed.
- # default: []
- exclude = ["libc"]
- [parse.expand]
- # A list of feature names that should be used when running `cargo expand`. This
- # combines with `default_features` like in your `Cargo.toml`. Note that the features
- # listed here are features for the current crate being built, *not* the crates
- # being expanded. The crate's `Cargo.toml` must take care of enabling the
- # appropriate features in its dependencies
- #
- # default: []
- features = ["cbindgen"]
|