Skip to content

Commit 9b0a878

Browse files
authored
Update bindgen (#382)
1 parent 6d6c8c1 commit 9b0a878

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

mozjs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ libc.workspace = true
3535
libz-sys = "1.0"
3636

3737
[build-dependencies]
38-
bindgen = { version = "0.62", default-features = false, features = [
38+
bindgen = { version = "0.66", default-features = false, features = [
3939
"runtime",
4040
"which-rustfmt",
4141
] }

mozjs/build.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ extern crate bindgen;
66
extern crate cc;
77
extern crate walkdir;
88

9+
use bindgen::Formatter;
910
use std::env;
1011
use std::ffi::{OsStr, OsString};
1112
use std::fs;
@@ -294,7 +295,7 @@ fn build_jsapi_bindings(build_dir: &Path) {
294295
config &= !bindgen::CodegenConfig::METHODS;
295296

296297
let mut builder = bindgen::builder()
297-
.rust_target(bindgen::RustTarget::Stable_1_40)
298+
.rust_target(bindgen::RustTarget::Stable_1_59)
298299
.header("./src/jsglue.hpp")
299300
// Translate every enum with the "rustified enum" strategy. We should
300301
// investigate switching to the "constified module" strategy, which has
@@ -303,7 +304,7 @@ fn build_jsapi_bindings(build_dir: &Path) {
303304
.size_t_is_usize(true)
304305
.enable_cxx_namespaces()
305306
.with_codegen_config(config)
306-
.rustfmt_bindings(true)
307+
.formatter(Formatter::Rustfmt)
307308
.clang_arg("-I")
308309
.clang_arg(build_dir.join("dist/include").to_str().expect("UTF-8"))
309310
.clang_arg("-I")

0 commit comments

Comments
 (0)