suon_database 0.1.0

Database abstraction layer for the Suon MMORPG framework
Documentation
  • Coverage
  • 88.89%
    8 out of 9 items documented7 out of 8 items with examples
  • Size
  • Source code size: 99.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.55 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4m 20s Average build duration of successful builds.
  • all releases: 4m 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • suonengine/suon-outdated
    5 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ramon-bernardo

Lightweight database-table resources for Bevy apps.

This crate wraps typed resources in a small table abstraction so systems can read and mutate game data through focused SystemParam types instead of reaching for raw resources directly.

Examples

use bevy::prelude::*;
use suon_database::{AppTablesExt, Database, DatabaseMut, Table};

#[derive(Default)]
struct HealthTable {
    hp: u32,
}

impl Table for HealthTable {}

let mut app = App::new();
app.init_database_table::<HealthTable>();

app.add_systems(Update, |mut table: DatabaseMut<HealthTable>| {
    table.hp = 42;
});
app.add_systems(PostUpdate, |table: Database<HealthTable>| {
    assert_eq!(table.hp, 42);
});

app.update();