Feature flag to add repr(c) to bevy types #14172
Labels
A-Cross-Cutting
Impacts the entire engine
A-Modding
Supporting infrastructure for player-controlled modifications to games
C-Feature
A new feature, making something new possible
X-Controversial
There is active debate or serious implications around merging this PR
What problem does this solve or what need does it fill?
I am developing bindings to bevy in C# using the new QueryBuilder/SytemBuilder API's. I am at the point where I can spawn entities with componenets and have systems run against them. This currently only works for custom types definied on the C# side as there is no nice way to pass a bevy
Transform
or math/bundle types over FFI.What solution would you like?
Add a repr-c feature which would tag relevant structs in components/math/bundles with a repr(c) allowing them to be passed over FFI without duplication/hacky solutions.
Something like:
What alternative(s) have you considered?
I would either have to duplicate all of the component/math/bundle types into my rust library or devise some way to calculate the struct layout so I can match it from C#.
The text was updated successfully, but these errors were encountered: