#systems #bevy #gamedev #plugin-system #macro #game

bevy-butler

A crate for making Bevy systems more self-documenting

25 releases (4 breaking)

0.5.6 Feb 8, 2025
0.5.6-alpha.1 Feb 7, 2025
0.5.4 Jan 31, 2025
0.4.0 Jan 12, 2025
0.1.1 Jan 7, 2025

#249 in Game dev

Download history 118/week @ 2025-01-01 566/week @ 2025-01-08 176/week @ 2025-01-15 655/week @ 2025-01-22 698/week @ 2025-01-29 404/week @ 2025-02-05 149/week @ 2025-02-12 9/week @ 2025-02-19 32/week @ 2025-02-26

758 downloads per month

MIT/Apache

36KB
369 lines

bevy-butler

A set of procedural macros for making Bevy plugins and systems more self-documenting.

Crates.io License Crates.io Version docs.rs Crates.io MSRV

Version Compatibility

bevy bevy-butler
0.15 0.5

Example

use bevy::prelude::*;
use bevy_butler::*;

#[butler_plugin]
pub struct MyPlugin;

#[derive(Resource)]
#[resource(plugin = MyPlugin, init = Hello("World".to_string()))]
pub struct Hello(pub String);

#[system(schedule = Update, plugin = MyPlugin)]
fn hello_plugin(name: Res<Hello>)
{
    info!("Hello, {}!", name.0);
}

#[system(schedule = Update, plugin = MyPlugin, after = hello_plugin)]
fn goodbye_plugin(name: Res<Hello>)
{
    info!("Goodbye, {}!", name.0);
}

fn main() {
    App::new()
        .add_plugins(MyPlugin)
        .run();
}

WebAssembly support

WebAssembly support is currently locked behind the wasm-experimental flag. See the relevant issue for more information.

Dependencies

~14–25MB
~368K SLoC