Hi, while we can mimic a struct defined in C header with #[repr©] for use of FFI, i wonder if it is possible to mimic the struct/class layout defined in a C++ header with something like #[repr(C++)]? It can calculate the proper offsets of the fields, taking C++ inheritance into account…
I think it can greatly ease the inter-op of Rust/C++, since we’ll be able to access the data directly…
I know it sounds a bit overkill, but i’d really like to see a library accomplish this with some minimal support from the language side… Then we’ll be able to provide more support for C++ headers.