From 6c9bd9d1fbf5d610815c33fa68b0ff4a634d3d83 Mon Sep 17 00:00:00 2001 From: YUCLing Date: Sun, 30 Apr 2023 21:38:48 +0800 Subject: [PATCH] fix: possible unnecessary bindings --- Cargo.lock | 2 +- scs_rs/Cargo.toml | 2 +- scs_rs/build.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a315cd4..15b1390 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,7 +199,7 @@ dependencies = [ [[package]] name = "scs-sdk-rs" -version = "0.2.1" +version = "0.2.2" dependencies = [ "bindgen", "scs-rs-proc-macros", diff --git a/scs_rs/Cargo.toml b/scs_rs/Cargo.toml index d7c1a7a..1dda6eb 100644 --- a/scs_rs/Cargo.toml +++ b/scs_rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "scs-sdk-rs" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["LuoRain "] description = "Bindings for SCS Software SDK" diff --git a/scs_rs/build.rs b/scs_rs/build.rs index 0f67c05..4b807bd 100644 --- a/scs_rs/build.rs +++ b/scs_rs/build.rs @@ -5,7 +5,8 @@ fn main() { let bindings = bindgen::Builder::default() .header("wrapper.hpp") - .blocklist_item(r#"(\w+)_(MAX|MIN|WIDTH)"#) + .allowlist_type(r#"scs_(\w+)"#) + .allowlist_var(r#"SCS_(\w+)"#) .blocklist_item(r#"some_requirement_failed_at_(\d+)"#) .blocklist_function(r#"(\w+)_(init|shutdown)(\w*)"#) .parse_callbacks(Box::new(bindgen::CargoCallbacks))