From c50b1ee7ecc2a82d6d429ea3a0746b7a2c68f374 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Sat, 21 May 2022 01:22:18 -0700 Subject: [PATCH 1/2] Tell bindgen to skip rustfmt The intermediate code is only for code to parse, so formatting is a waste of time. Also it prints an annoying message when it can't find rustfmt otherwise. --- engine/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 4edc4a461..749ee7b07 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -304,6 +304,7 @@ impl IncludeCppEngine { .default_enum_style(bindgen::EnumVariation::Rust { non_exhaustive: false, }) + .rustfmt_bindings(false) .size_t_is_usize(true) .enable_cxx_namespaces() .generate_inline_functions(true) From eaa1f8737ad9247787b1c58970a59430add8cf65 Mon Sep 17 00:00:00 2001 From: Brian Silverman Date: Sun, 29 May 2022 16:39:35 -0700 Subject: [PATCH 2/2] Leave bindgen enabled when logging is --- engine/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 749ee7b07..86a31ea67 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -304,7 +304,7 @@ impl IncludeCppEngine { .default_enum_style(bindgen::EnumVariation::Rust { non_exhaustive: false, }) - .rustfmt_bindings(false) + .rustfmt_bindings(log::log_enabled!(log::Level::Info)) .size_t_is_usize(true) .enable_cxx_namespaces() .generate_inline_functions(true)