-
Notifications
You must be signed in to change notification settings - Fork 35
/
cbindgen.toml
53 lines (51 loc) · 2.08 KB
/
cbindgen.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# An optional string of text to output at the beginning of the generated file
header = """
/* Unless specifically indicated otherwise in a file, files are licensed
* under the Apache 2.0 license, as can be found in: apache-2.0.txt
*/
"""
# An optional name to use as an include guard
# An optional string of text to output between major sections of the generated
# file as a warning against manual editing
autogen_warning = """
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.
* To regenerate use `rustup run nightly cbindgen . > target/header.h` in this directory.
*/
"""
# Whether to include a comment with the version of cbindgen used to generate the
# file
include_version = true
# The style to use for curly braces
braces = "SameLine"
# The desired length of a line to use when formatting lines
line_length = 80
# The amount of spaces in a tab
tab_width = 8
# The language to output bindings in
language = "C"
# A rule to use to select style of declaration in C, tagname vs typedef
style = "Both"
# How the generated documentation should be commented.
# C uses /* */; C99 uses //; C++ uses ///; Doxy is like C but with leading * per line.
documentation_style = "C"
no_includes = true
[parse]
# Whether to parse dependent crates and include their types in the generated
# bindings
parse_deps = false
# A white list of crate names that are allowed to be parsed
include = ["cmsis-pack-manager"]
# Whether to use a new temporary target directory when running `rustc --pretty=expanded`.
# This may be required for some build processes.
clean = false
[parse.expand]
# A list of crate names that should be run through `cargo expand` before
# parsing to expand any macros
crates = ["cmsis-pack-manager"]
# If enabled, use the `--all-features` option when expanding. Ignored when
# `features` is set. Disabled by default, except when using the
# `expand = ["euclid"]` shorthand for backwards-compatibility.
all_features = false
# When `all_features` is disabled and this is also disabled, use the
# `--no-default-features` option when expanding. Enabled by default.
default_features = true