Skip to content

Commit e31d6e2

Browse files
committed
feat(bindgen): enable default derivation for bindings
* Added `.derive_default(true)` to the bindgen builder to automatically derive default implementations for types. * This change enhances usability by simplifying the generated bindings. Signed-off-by: benshi <807629978@qq.com>
1 parent 6b17eb3 commit e31d6e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/sherpa-rs-sys/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ fn main() {
315315
let mut bindings_builder = bindgen::Builder::default()
316316
.header("wrapper.h")
317317
.clang_arg(format!("-I{}", sherpa_dst.display()))
318-
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()));
318+
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
319+
.derive_default(true);
319320

320321
if let Some(clang_target) = RUST_CLANG_TARGET_MAP.get(&target) {
321322
// Explicitly set target in case we are cross-compiling.

0 commit comments

Comments
 (0)