Skip to content

Commit 5f8e027

Browse files
committed
rename to extra_bindings per IRC discussion.
1 parent 16b2a25 commit 5f8e027

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,10 @@ exclude = ["libc"]
752752
clean = false
753753

754754
# Which crates other than the top-level binding crate we should generate
755-
# top-level constants / globals and functions.
755+
# bindings for.
756756
#
757757
# default: []
758-
deps_with_top_level_items = ["my_awesome_dep"]
758+
extra_bindings = ["my_awesome_dep"]
759759

760760
[parse.expand]
761761
# A list of crate names that should be run through `cargo expand` before

src/bindgen/config.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ pub struct ParseConfig {
564564
pub clean: bool,
565565
/// List of crate names which generate consts, statics, and fns. By default
566566
/// no dependent crates generate them.
567-
pub deps_with_top_level_items: Vec<String>,
567+
pub extra_bindings: Vec<String>,
568568
}
569569

570570
impl ParseConfig {
@@ -578,9 +578,7 @@ impl ParseConfig {
578578
return true;
579579
}
580580

581-
self.deps_with_top_level_items
582-
.iter()
583-
.any(|dep| dep == crate_name)
581+
self.extra_bindings.iter().any(|dep| dep == crate_name)
584582
}
585583
}
586584

template.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ parse_deps = false
127127
# include = []
128128
exclude = []
129129
clean = false
130-
# deps_with_top_level_items = []
130+
extra_bindings = []
131131

132132

133133

tests/rust/workspace/cbindgen.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[parse]
22
parse_deps = true
3-
deps_with_top_level_items = ["dep"]
3+
extra_bindings = ["dep"]

0 commit comments

Comments
 (0)