Skip to content

Commit df3a44c

Browse files
committed
build: strict bindgen on static functions
1 parent 1c19fa0 commit df3a44c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mbedtls-sys/build/bindgen.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,14 @@ impl super::BuildConfig {
100100
};
101101
}
102102

103-
103+
104104
// generate static function wrappers without any other rust related parameters to ensure
105105
// correctness of result C code
106106
bindgen::builder()
107107
.clang_args(cc.get_compiler().args().iter().map(|arg| arg.to_str().unwrap()))
108108
.header_contents("bindgen-input.h", &header)
109+
.allowlist_function("^(?i)mbedtls_.*")
110+
.allowlist_function("^(?i)psa_.*")
109111
.wrap_static_fns(true)
110112
.wrap_static_fns_path(&self.static_wrappers_c)
111113
.generate().expect("bindgen error");

0 commit comments

Comments
 (0)