Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Assuming by "non-Rust types" you mean "those that the bevy_reflect crate doesn't know about", it's indeed limited by the orphan rule. That being said, bevy_reflect offers many workarounds for this problem. Because bevy_reflect is based on a type registry containing function pointers, you can actually populate it manually for types external to your crate without using the Reflect trait at all if you want to. And if your type contains fields that aren't Reflect, then you can use custom reflection logic.


non-Rust meaning non-std types, for which Bevy reflect can do manual trait implementation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: