Skip to content

Commit f0a01dc

Browse files
authored
refactor: clean up bindings (#112)
* refactor: switch to explicit allowlist for bindgen * feat: disable deprecated mbedtls functions * chore: update bindgen to 0.72 * chore: regenerate vendored bindings
1 parent 2a902de commit f0a01dc

File tree

24 files changed

+58
-2045
lines changed

24 files changed

+58
-2045
lines changed

mbedtls-rs-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ esp-idf-sys = { version = "0.36", default-features = false }
5656

5757
[build-dependencies]
5858
anyhow = "1"
59-
bindgen = "0.71"
59+
bindgen = "0.72"
6060
enumset = "1"
6161
env_logger = "0.11"
6262
log = "0.4"

mbedtls-rs-sys/gen/builder.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,11 @@ impl MbedtlsBuilder {
113113
.derive_debug(false)
114114
.derive_default(true)
115115
.layout_tests(false)
116-
.blocklist_function("strtold")
117-
.blocklist_function("_strtold_r")
118-
.blocklist_function("v.*printf")
119-
.blocklist_function("v.*scanf")
120-
.blocklist_function("_v.*printf_r")
121-
.blocklist_function("_v.*scanf_r")
122-
.blocklist_function("q.*cvt")
123-
.blocklist_function("q.*cvt_r")
116+
.allowlist_recursively(false)
117+
.allowlist_item("mbedtls_.+")
118+
.allowlist_item("MBEDTLS_.+")
119+
.allowlist_item("psa_.+")
120+
.allowlist_item("PSA_.+")
124121
.header(
125122
self.crate_root_path
126123
.join("gen")

mbedtls-rs-sys/gen/include/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
*
328328
* Uncomment to get errors on using deprecated functions and features.
329329
*/
330-
//#define MBEDTLS_DEPRECATED_REMOVED
330+
#define MBEDTLS_DEPRECATED_REMOVED
331331

332332
/** \} name SECTION: System support */
333333

-2.18 KB
Binary file not shown.
-3.64 KB
Binary file not shown.
-440 Bytes
Binary file not shown.
-2.18 KB
Binary file not shown.
-3.64 KB
Binary file not shown.
-440 Bytes
Binary file not shown.
-2.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)