Skip to contentSkip to conversation

rust: update bindgen to 0.69.4; remove custom type modifications

PATCH Applied Thomas Bertschinger 2 participants 2 messages Feb 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: update bindgen to 0.69.4; remove custom type modifications

This updates rust-bindgen to version 0.69.4 which includes the patch 199bee441ad0: "try to avoid #[repr(packed)] when align is needed". With this patch, bindgen generates code that is both ABI-correct and can be compiled by rustc, for 3 bcachefs types:

- bkey
- bch_extent_crc32
- bch_extent_ptr

This allows us to remove the custom treatment for these three types.

---
 Cargo.lock             | 21 ++++++++++++---------
 bch_bindgen/Cargo.toml |  2 +-
 bch_bindgen/build.rs   | 43 +++++++++---------------------------------
 3 files changed, 22 insertions(+), 44 deletions(-)
Cargo.lock +12 -9
index bcbdbc5..9987974 100644
@@ -119,17 +119,17 @@ dependencies = [
 
 [[package]]
 name = "bindgen"
-version = "0.69.2"
+version = "0.69.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d"
+checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
 dependencies = [
  "bitflags 2.4.2",
  "cexpr",
  "clang-sys",
+ "itertools",
  "lazy_static",
  "lazycell",
  "log",
- "peeking_take_while",
  "prettyplease",
  "proc-macro2",
  "quote",
@@ -332,6 +332,15 @@ dependencies = [
  "windows-sys 0.52.0",
 ]
 
+[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
 [[package]]
 name = "lazy_static"
 version = "1.4.0"
@@ -425,12 +434,6 @@ version = "1.0.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
 
-[[package]]
-name = "peeking_take_while"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
-
 [[package]]
 name = "pkg-config"
 version = "0.3.29"
bch_bindgen/Cargo.toml +1 -1
index fcc4668..63be4f3 100644
@@ -19,4 +19,4 @@ paste = "1.0.11"
 
 [build-dependencies]
 pkg-config = "0.3"
-bindgen = "0.69.2"
+bindgen = "0.69.4"
bch_bindgen/build.rs +9 -34

49 lines not on this page · raw message

Signature · 1 line
2.43.0
#1 lore raw
Quoted 5 lines · Thomas Bertschinger

This updates rust-bindgen to version 0.69.4 which includes the patch 199bee441ad0: "try to avoid #[repr(packed)] when align is needed". With this patch, bindgen generates code that is both ABI-correct and can be compiled by rustc, for 3 bcachefs types:

Quoted 7 lines

- bkey
- bch_extent_crc32
- bch_extent_ptr

This allows us to remove the custom treatment for these three types.

Thanks! Applied.