summaryrefslogtreecommitdiff
path: root/rust-src/bch_bindgen
diff options
context:
space:
mode:
authorDaniel Hill <daniel@gluo.nz>2022-11-26 14:39:39 +1300
committerDaniel Hill <daniel@gluo.nz>2023-01-03 16:58:55 +1300
commit9d6040c8b60d10f901141df9d739005f3fe0326e (patch)
tree4a7f181e63321cfb237f518a06509f2cf9fec616 /rust-src/bch_bindgen
parent42cf74fd1d0ef58927967e6236988e86cfc0d086 (diff)
rust: update bindgen to 0.63
Signed-off-by: Daniel Hill <daniel@gluo.nz>
Diffstat (limited to 'rust-src/bch_bindgen')
-rw-r--r--rust-src/bch_bindgen/Cargo.lock5
-rw-r--r--rust-src/bch_bindgen/Cargo.toml2
-rw-r--r--rust-src/bch_bindgen/build.rs9
-rw-r--r--rust-src/bch_bindgen/src/bcachefs.rs15
4 files changed, 5 insertions, 26 deletions
diff --git a/rust-src/bch_bindgen/Cargo.lock b/rust-src/bch_bindgen/Cargo.lock
index ad67f8e2..0084865f 100644
--- a/rust-src/bch_bindgen/Cargo.lock
+++ b/rust-src/bch_bindgen/Cargo.lock
@@ -34,9 +34,9 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.59.2"
+version = "0.63.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8"
+checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885"
dependencies = [
"bitflags",
"cexpr",
@@ -49,6 +49,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
+ "syn",
]
[[package]]
diff --git a/rust-src/bch_bindgen/Cargo.toml b/rust-src/bch_bindgen/Cargo.toml
index 91cc77fe..37a56273 100644
--- a/rust-src/bch_bindgen/Cargo.toml
+++ b/rust-src/bch_bindgen/Cargo.toml
@@ -23,4 +23,4 @@ gag = "1.0.0"
[build-dependencies]
pkg-config = "0.3"
-bindgen = { version = "0.59.1", default-features = false }
+bindgen = { version = "0.63", default-features = false }
diff --git a/rust-src/bch_bindgen/build.rs b/rust-src/bch_bindgen/build.rs
index fd570dbb..e729bcab 100644
--- a/rust-src/bch_bindgen/build.rs
+++ b/rust-src/bch_bindgen/build.rs
@@ -1,6 +1,5 @@
fn main() {
use std::path::PathBuf;
- // use std::process::Command;
let out_dir: PathBuf = std::env::var_os("OUT_DIR").expect("ENV Var 'OUT_DIR' Expected").into();
let top_dir: PathBuf = std::env::var_os("CARGO_MANIFEST_DIR")
@@ -28,11 +27,6 @@ fn main() {
.layout_tests(true)
.default_enum_style(bindgen::EnumVariation::Rust { non_exhaustive: true })
.allowlist_function(".*bch2_.*")
- // .allowlist_function("bch2_read_super")
- // .allowlist_function("bch2_sb_field_.*")
- // .allowlist_function("bch2_super_write")
- // .allowlist_function("bch2_chacha_encrypt_key")
- // .allowlist_function("__bch2_super_read")
.allowlist_function("bio_.*")
.allowlist_function("bch2_super_write_fd")
.allowlist_function("derive_passphrase")
@@ -53,8 +47,7 @@ fn main() {
.newtype_enum("bch_kdf_types")
.opaque_type("gendisk")
.opaque_type("bkey")
- // .opaque_type("bch_extent_ptr")
- // .opaque_type("bch_extent_crc32")
+ .opaque_type("gc_stripe")
.opaque_type("open_bucket.*")
.generate()
.expect("BindGen Generation Failiure: [libbcachefs_wrapper]");
diff --git a/rust-src/bch_bindgen/src/bcachefs.rs b/rust-src/bch_bindgen/src/bcachefs.rs
index cc98ffc1..6e36790a 100644
--- a/rust-src/bch_bindgen/src/bcachefs.rs
+++ b/rust-src/bch_bindgen/src/bcachefs.rs
@@ -40,21 +40,6 @@ impl PartialEq for bch_sb {
}
}
-impl std::fmt::Debug for bch_sb {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("bch_sb")
- .field("uuid", &self.uuid())
- .field("version", &(self.version, self.version_min))
- .field("block_size", &self.block_size)
- .field("device_idx", &self.dev_idx)
- .field("seq", &self.seq)
- .field("csum", &(self.csum.lo, self.csum.hi))
- .field("offset", &self.offset)
- .finish_non_exhaustive()
- }
-}
-
-
impl bch_sb {
pub fn crypt(&self) -> Option<&bch_sb_field_crypt> {
unsafe {