fix: possible unnecessary bindings

This commit is contained in:
2023-04-30 21:38:48 +08:00
parent 91ea30a4d4
commit 6c9bd9d1fb
Signed by: LuoRain
GPG key ID: 16B4D3D5372966A6
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View file

@ -199,7 +199,7 @@ dependencies = [
[[package]] [[package]]
name = "scs-sdk-rs" name = "scs-sdk-rs"
version = "0.2.1" version = "0.2.2"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"scs-rs-proc-macros", "scs-rs-proc-macros",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "scs-sdk-rs" name = "scs-sdk-rs"
version = "0.2.1" version = "0.2.2"
edition = "2021" edition = "2021"
authors = ["LuoRain <luotianyi@luotianyi.me>"] authors = ["LuoRain <luotianyi@luotianyi.me>"]
description = "Bindings for SCS Software SDK" description = "Bindings for SCS Software SDK"

View file

@ -5,7 +5,8 @@ fn main() {
let bindings = bindgen::Builder::default() let bindings = bindgen::Builder::default()
.header("wrapper.hpp") .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_item(r#"some_requirement_failed_at_(\d+)"#)
.blocklist_function(r#"(\w+)_(init|shutdown)(\w*)"#) .blocklist_function(r#"(\w+)_(init|shutdown)(\w*)"#)
.parse_callbacks(Box::new(bindgen::CargoCallbacks)) .parse_callbacks(Box::new(bindgen::CargoCallbacks))