bevy_persist
Automatic persistence for Bevy resources with change detection.
Features
- Automatic Save/Load: Resources are automatically saved when modified and loaded on startup
- Multiple Formats: Support for JSON and RON serialization formats
- Change Detection: Only saves when resources actually change, minimizing disk I/O
- Derive Macro: Simple
#[derive(Persist)]to make any resource persistent - Flexible Configuration: Customize save paths, formats, and save strategies per resource
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
Quick Start
use *;
use *;
use ;
Advanced Usage
Manual Save Control
// Manual save in a system
RON Format
Use RON format for more readable configuration files:
new
.add_plugins
// ...
Examples
Check out the examples/ directory for more usage examples:
basic.rs- Simple settings persistenceadvanced.rs- Complex game state with multiple persistent resources
Run examples with:
License
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.