Open ddobrev opened 7 years ago
So does this mean currently that the generated code is tied to a specific arch? Do you guys have an estimate of when this might be completed? Also, how does ARM (iOS/Android) fit into this picture? Should I be moving to C based bindings only?
Ok thanks for the information. Will see if I can find some time to help out with this. I will definitely need to go C bindings route, and do not want to go back to writing manual bindings if I can avoid it.
This cannot be reliably done, unfortunately. LayoutKind.Sequential is too limited and cannot handle all cases of layouts, even with the correct packing. We are only leaving the option for sequential layouts, off by default and should be used with extreme caution.
The remark above is only valid for C++ because of inheritance. We can still safely enable it for C so I am reopening.
Since C compilers do not mangle names of functions, we can easily have universal C# bindings for C by using sequential layouts. We need to complete https://github.com/mono/CppSharp/issues/771 and https://github.com/mono/CppSharp/issues/772 first but then we'll be able to make a really simple change to have sequential layouts generated by default when wrapping C thus getting universal bindings.