#bevy #gamedev #macro #system #resources

bevy-butler

A crate for making Bevy systems more self-documenting

28 releases (5 breaking)

new 0.6.1-alpha.1 Mar 28, 2025
0.5.7 Mar 20, 2025
0.5.6 Feb 8, 2025
0.5.4 Jan 31, 2025
0.1.1 Jan 7, 2025

#873 in Game dev

Download history 673/week @ 2025-01-07 42/week @ 2025-01-14 555/week @ 2025-01-21 779/week @ 2025-01-28 563/week @ 2025-02-04 131/week @ 2025-02-11 31/week @ 2025-02-18 16/week @ 2025-02-25 17/week @ 2025-03-04 249/week @ 2025-03-18 128/week @ 2025-03-25

402 downloads per month

MIT/Apache

38KB
382 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.16 0.6
0.15 0.5

Example

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

#[butler_plugin]
pub struct MyPlugin;

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

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

#[add_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

~17–25MB
~370K SLoC