#bevy #gamedev #bevy-butler #macro #system #resources

bevy-butler

A crate for making Bevy systems more self-documenting

33 releases (5 breaking)

new 0.6.2-alpha.1 May 2, 2025
0.6.1-alpha.1 Mar 28, 2025
0.5.8-alpha.1 May 1, 2025

#563 in Game dev

Download history 338/week @ 2025-01-10 212/week @ 2025-01-17 767/week @ 2025-01-24 653/week @ 2025-01-31 306/week @ 2025-02-07 138/week @ 2025-02-14 10/week @ 2025-02-21 28/week @ 2025-02-28 154/week @ 2025-03-14 113/week @ 2025-03-21 135/week @ 2025-03-28 5/week @ 2025-04-04 6/week @ 2025-04-11 4/week @ 2025-04-18 241/week @ 2025-04-25

266 downloads per month

MIT/Apache

31KB
290 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::*;

#[butler_plugin]
struct MyPlugin;

#[derive(Resource)]
#[insert_resource(plugin = MyPlugin, init = Hello("World".to_string()))]
struct Hello(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

~16–25MB
~371K SLoC