diff --git a/Cargo.lock b/Cargo.lock index d9ef35c1c..3f4dd92b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,9 +164,9 @@ dependencies = [ [[package]] name = "autocxx-bindgen" -version = "0.62.1" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91f11671d76c2c02f3e6906bb06b13a9046cd069d095ff14a94d9c9a7bd40a20" +checksum = "6c9fb7b8dd83a582e12157367773d8d1195f2dea54d4250aaf3426abae3237aa" dependencies = [ "bitflags", "cexpr", @@ -176,12 +176,13 @@ dependencies = [ "lazycell", "log", "peeking_take_while", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.18", "which", ] diff --git a/engine/Cargo.toml b/engine/Cargo.toml index b54203963..4a887f12c 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -30,8 +30,8 @@ log = "0.4" proc-macro2 = "1.0.11" quote = "1.0" indoc = "1.0" -autocxx-bindgen = { version = "=0.62.1", default-features = false, features = ["logging", "which-rustfmt"] } -#autocxx-bindgen = { git = "https://github.com/adetaylor/rust-bindgen", branch = "merge-upstream-0.62" } +autocxx-bindgen = { version = "=0.65.1", default-features = false, features = ["logging", "which-rustfmt"] } +#autocxx-bindgen = { git = "https://github.com/maurer/rust-bindgen", branch = "update-0.65.1", default-features = false, features = ["logging", "which-rustfmt"] } itertools = "0.10.3" cc = { version = "1.0", optional = true } # Note: Keep the patch-level version of cxx-gen and cxx in sync. diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 6ab8266c0..15a39da0d 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -336,7 +336,11 @@ impl IncludeCppEngine { .default_enum_style(bindgen::EnumVariation::Rust { non_exhaustive: false, }) - .rustfmt_bindings(log::log_enabled!(log::Level::Info)) + .formatter(if log::log_enabled!(log::Level::Info) { + bindgen::Formatter::Rustfmt + } else { + bindgen::Formatter::None + }) .size_t_is_usize(true) .enable_cxx_namespaces() .generate_inline_functions(true)