Skip to content

bevy_db

Async key-value persistence with one Bevy-facing API and two backends:

  • Nativeredb pure-Rust B+tree on disk
  • WASMrexie over IndexedDB in the browser

All I/O runs off the game thread via bevy_tasker. Game systems poll DbRequest<T> handles via try_recv() to drain results without stalling the schedule.

  • BevyDbPlugin — initializes the backend and inserts the Db resource
  • Db — request handle for get / put / delete
  • DbRequest<T> — pending async result polled with try_recv()
  • DbError — backend-agnostic error enum