Skip to content

Convenience macros for using serde in Bevy (currently bevy ecs only)

License

Notifications You must be signed in to change notification settings

bbarker/bevy_serde_macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_serde_macros

Crates.io Docs.rs

This crate lets you serialize specified components and their associated entities using a "list" of components, as well as the marked entities you wish to serialize. The result is that the intersection of marked entities and specified components are serialized.

Though this currently targets bevy ECS only, other aspects of bevy may be added in the future.

See the tests for usage examples (save_game and load_game). Currently, the list of components is specified by a macro that the user must implement (named execute_with_type_list in the examples).

Acknowledgments

  1. The original inspiration was from Herbert "TheBracket" Wolverson's Rust Roguelike Tutorial (Copyright 2019 Herbert Wolverson (DBA Bracket Productions)).
  2. One of the changes to the tutorial was largely thanks to the addition of execute_with_type_list!, with credit to Michael F. Bryan - see code comments for details.
  3. The code from the tutorial relied on some helper functions from specs (Copyright (c) 2017 The Specs Project Developers), which I had to rewrite for Bevy.
  4. Also thanks to the Bevy community for getting me up to speed on the Bevy ECS.

About

Convenience macros for using serde in Bevy (currently bevy ecs only)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published