-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancing VTable Generation to Support Inherited Classes #2799
Comments
In general this seems like a feature worth implementing.
Does something like: let base_ty = ctx.resolve_item(base.ty).expect_type(); not work? From there you have the type (you could have an |
Input C/C++ Header
Bindgen Invocation
Actual Results
Currently, the vtable generation is limited to virtual classes without any base members.
Expected Results
The expectation is to extend vtable generation to support more complex class hierarchies.
Current Work Status
I'm in the process of addressing this issue through a PR. My aim is to remove the limitation preventing the generation from working with classes that have inheritance. However, I've encountered some hurdles along the way. It would be immensely helpful to connect with a maintainer of rust-bindgen to discuss the underlying architecture in more detail.
So far, I've made progress, but I've hit a roadblock. Specifically, I'm unsure how to access the
comp_info
of base members in order to retrieve their associated fields, types, and sizes. My goal is to associate a VTable declaration for each class with accurate information. Additionally, I aim to incorporate base member fields directly into each class, rather than addingbase_XXX
fields to each class (which occurs due to vtable merging).The text was updated successfully, but these errors were encountered: