Commit b88fd711 authored by Ryan Hunt's avatar Ryan Hunt
Browse files

Fix some formatting

parent c9eadb88
......@@ -51,88 +51,72 @@ Here is a description of the options available in a config.
```toml
# An optional string of text to output at the beginning of the generated file
header = <string>
header = "/* Text to put at the beginning of the generated file. Probably a license. */"
# An optional string of text to output at the end of the generated file
trailer = <string>
trailer = "/* Text to put at the end of the generated file */"
# An optional name to use as an include guard
include_guard = <string>
include_guard = "mozilla_wr_bindings_h"
# An optional string of text to output between major sections of the generated
# file as a warning against manual editing
autogen_warning = <string>
autogen_warning = "// Warning, 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
include_version = <bool>
include_version = true
# An optional namespace to output around the generated bindings
namespace = <string>
namespace = "ffi"
# An optional list of namespaces to output around the generated bindings
namespaces = [<string>]
namespaces = ["mozilla", "wr"]
# The style to use for curly braces
braces = <curly>
braces = "[SameLine|NextLine]"
# The desired length of a line to use when formatting lines
line_length = <integer>
line_length = 80
# The amount of spaces in a tab
tab_width = <integer>
tab_width = 2
# The language to output bindings in
language = <language>
language = "[C|C++]"
[parse]
# Whether to parse dependent crates and include their types in the generated
# bindings
parse_deps = <bool>
parse_deps = true
# A white list of crate names that are allowed to be parsed
include = [<string>]
include = ["webrender", "webrender_traits"]
# A black list of crate names that are not allowed to be parsed
exclude = [<string>]
exclude = ["libc"]
# A list of crate names that should be run through `cargo expand` before
# parsing to expand any macros
expand = [<string>]
expand = ["euclid"]
[fn]
# An optional prefix to put before every function declaration
prefix = <string>
prefix = "string"
# An optional postfix to put after any function declaration
postfix = <string>
postfix = "string"
# How to format function arguments
args = <layout>
args = "Auto|Vertical|Horizontal"
# A rule to use to rename function argument names
rename_args = <rename-rule>
rename_args = "None|GeckoCase|LowerCase|UpperCase|PascalCase|CamelCase|SnakeCase|ScreamingSnakeCase|QualifiedScreamingSnakeCase"
[struct]
# A rule to use to rename field names
rename_fields = <rename-rule>
rename_fields = "None|GeckoCase|LowerCase|UpperCase|PascalCase|CamelCase|SnakeCase|ScreamingSnakeCase|QualifiedScreamingSnakeCase"
# Whether to derive an operator== for all structs
derive_eq = <bool>
derive_eq = false
# Whether to derive an operator!= for all structs
derive_neq = <bool>
derive_neq = false
# Whether to derive an operator< for all structs
derive_lt = <bool>
derive_lt = false
# Whether to derive an operator<= for all structs
derive_lte = <bool>
derive_lte = false
# Whether to derive an operator> for all structs
derive_gt = <bool>
derive_gt = false
# Whether to derive an operator>= for all structs
derive_gte = <bool>
derive_gte = false
[enum]
# A rule to use to rename enum variants
rename_variants = <rename-rule>
# With
<curly> = ["SameLine" | "NextLine"]
<language> = ["C++" | "C"]
<layout> = ["Auto" |
"Vertical" |
"Horizontal"]
<rename-rule> = ["None" |
"GeckoCase" |
"LowerCase" |
"UpperCase" |
"PascalCase" |
"CamelCase" |
"SnakeCase" |
"ScreamingSnakeCase" |
"QualifiedScreamingSnakeCase"]
rename_variants = "None|GeckoCase|LowerCase|UpperCase|PascalCase|CamelCase|SnakeCase|ScreamingSnakeCase|QualifiedScreamingSnakeCase"
```
A full listing of options can be found in `src/bindgen/config.rs`.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment