Repository navigation
fix(sys): update bindgen to 0.72 for libclang 22 compatibility - #416
Open
clydegerber wants to merge 1 commit into
Open
clydegerber wants to merge 1 commit into
clydegerber wants to merge 1 commit into
Conversation
With libclang 22, bindgen 0.69.5 emits `UText` and `UCharIterator` as opaque one-byte placeholders instead of their real definitions, so the generated bindings have the wrong layout. GitHub's ubuntu-26.04 runner image ships libclang 22, which breaks the `test-static-linking` job. bindgen 0.72 generates both structs correctly. It also turns the layout checks into compile-time assertions, so the `bindgen_test_layout_*` runtime tests are no longer emitted. This commit was created by an automated coding assistant, with human supervision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With libclang 22, bindgen 0.69.5 emits
UTextandUCharIteratoras opaque placeholders (pub _address: u8, size 1) instead of their real definitions. GitHub'subuntu-26.04runner image installs clang 20, 21 and 22, and clang-sys loads the newest, sotest-static-linking (ubuntu-latest)fails once a repo is moved to that image:google/rust_icu's runs are still landing on
ubuntu-24.04, so CI here is green for now. The same commit already fails on a fork that was moved to 26.04 (run).Change
rust_icu_sys:bindgen0.69.5 → 0.72 (resolves to 0.72.1)Cargo.lockandMODULE.bazel.lockrefreshed. The Bazel build doesn't run bindgen, so for Bazel only the lockfile changes.bindgen 0.70+ checks layouts at compile time, so the
bindgen_test_layout_*runtime tests inrust_icu_sysare no longer generated.Testing
ubuntu:26.04container (ICU 78.2, libclang 22): reproduced the failure with 0.69.5; with 0.72.1cargo testpasses for the whole workspace (226 passed, 0 failed) andUTextis generated with all its fields.cargo testpasses for the whole workspace (226 passed, 0 failed).This commit was created by an automated coding assistant, with human supervision.
🤖 Generated with Claude Code