-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support for serde #174
Comments
Yeah this makes sense to me! |
Keep in mind there’s also https://github.com/not-fl3/nanoserde and https://github.com/dtolnay/miniserde. |
I think its worth giving the "minimal serde" implementations a fair shake, given how much they improved macroquad compiles. But I dont think we'll see similar clean compile time improvements without fully removing syn + quote dependencies from the tree. They run pretty deep in many rust crates, so this will likely be very hard. In general, while serde does have a compile time cost, it is the ecosystem standard and it feels "worth it" to be aligned and have the additional flexibility it gives. We also heavily rely on erased_serde for Short term, I don't see much harm in adding additional serde impls, given how prevalent it is in our codebase (and our dependencies' code bases). |
For compile times you may want to investigate cargo watt as a way to pre-compile the proc macros to WASM, preventing the need to compile them when building bevy. |
While trying to make a keybinding config, I came across the issue that
bevy_input::KeyCode
doesn't implementSerialize
orDeserialize
and there is no feature to do so. I think it would be nice to have support for serde (behind a feature) for types which users of bevy may want to serialize, such asKeyCode
andMouseButton
.The text was updated successfully, but these errors were encountered: