#bevy-plugin #single-file #gamedev #resources #persisting #resources-file #preferences #task #ron #prefs

bevy_simple_prefs

A small Bevy plugin for persisting multiple Resources to a single file

9 releases (5 breaking)

Uses new Rust 2024

new 0.6.2 May 29, 2025
0.6.1 May 27, 2025
0.5.1 May 5, 2025
0.5.0 Apr 25, 2025
0.1.0 Jul 4, 2024

#1245 in Game dev

Download history 5/week @ 2025-02-08 33/week @ 2025-02-15 6/week @ 2025-02-22 11/week @ 2025-03-01 2/week @ 2025-03-29 52/week @ 2025-04-05 64/week @ 2025-04-19 62/week @ 2025-04-26 220/week @ 2025-05-03 126/week @ 2025-05-10 76/week @ 2025-05-17 411/week @ 2025-05-24

835 downloads per month

MIT/Apache

39KB
168 lines

bevy_simple_prefs

crates.io docs Following released Bevy versions

An unambitious Bevy plugin for persisting multiple Bevy Resources into a single preferences file, suitable for small projects like jam games.

  • Persists to a single ron file
  • Does IO in Bevy's async task pool
  • WASM compatible

Usage

  • Derive Prefs on a struct with members that are Resources you want to be saved
  • Simply modify your Resources to initiate a save
  • Write code that reacts to those Resources changing, if you want

See examples/prefs.rs

Compatibility

bevy_simple_prefs bevy
0.5-0.6 0.16
0.4 0.15
0.1-0.3 0.14

Contributing

Please feel free to open a PR, but keep in mind this project's goals. This is meant to be a very lightweight crate. There should be zero additional dependencies on other Bevy ecosystem crates.

Please keep PRs small and scoped to a single feature or fix.

Alternatives

If you need more features, check out bevy-settings. There are also a few other options in the persistence section of Bevy Assets.

Dependencies

~40MB
~684K SLoC