29 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

#2813 in Procedural macros

Download history 147/week @ 2025-01-01 586/week @ 2025-01-08 185/week @ 2025-01-15 683/week @ 2025-01-22 713/week @ 2025-01-29 408/week @ 2025-02-05 101/week @ 2025-02-12 11/week @ 2025-02-19 38/week @ 2025-02-26 277/week @ 2025-03-19

316 downloads per month
Used in bevy-butler

MIT/Apache

68KB
2K SLoC

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

~1–1.6MB
~37K SLoC