Implement serde for toecs::World and try hot reloading!
Use case
Run your toecs-based game from a host crate. Recompile the game and
- Serialize the
toecs-based game
- Reload the
toecs-based game library
- Deserialize the last data
How to implement serde
ECS serde support may be one of the followings:
-
Directly serialize and deserialze the World
This is not human-readable and not good for backward-compatibilities, but it would work out of the box.
-
Use intermediate data format such as DynamicScene in Bevy
This is human-readable and better for backward-compatibilities, but there would be lots more things to consider.
This time I'll go with the 1: direct serde support.
Implement
serdefortoecs::Worldand try hot reloading!Use case
Run your toecs-based game from a host crate. Recompile the game and
toecs-based gametoecs-based game libraryHow to implement
serdeECS
serdesupport may be one of the followings:Directly serialize and deserialze the
WorldThis is not human-readable and not good for backward-compatibilities, but it would work out of the box.
Use intermediate data format such as
DynamicScenein BevyThis is human-readable and better for backward-compatibilities, but there would be lots more things to consider.
This time I'll go with the 1: direct
serdesupport.