Replies: 2 comments 1 reply
-
|
I reproduced!! The problem is in libclang 22.1.3 , when I tried with version 19 it works fine. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I think #3264 is related? Try master / latest release? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, for some reason a small amount of structs are just not getting generated correctly. Bindgen somehow knows the correct size of the struct (I verified by hand, size is indeed 52 bytes and align is 4). But when it comes to actually generating the fields it a) doesn't generate fields, b) doesn't generate assertions for those fields, c) leaves
_address: u8sentinel. And the most perplexing thing is that structs that are defined near by are getting generated fine.This is not an issue because I can't get it to reproduce. When I clone it as a local repository anywhere on my machine, it doesn't work, but when I clone it on other machines, it generates code fine... Rust versions match if I am not mistaken, Cargo.lock file is commited and is the same.
This is a potential issue with rust-bindgen (like, in any case, how does it know the size of the struct but doesn't know any of the fields?). Does anyone have any ideas what it may be?
I am getting code generated like this:
The struct itself is:
Header file in question: https://github.com/eclipse-threadx/threadx/blob/master/common/inc/tx_api.h
Beta Was this translation helpful? Give feedback.
All reactions