| Crates.io | bevy-butler |
| lib.rs | bevy-butler |
| version | 0.6.2 |
| created_at | 2025-01-07 07:54:15.191054+00 |
| updated_at | 2025-05-16 18:10:54.51502+00 |
| description | A crate for making Bevy systems more self-documenting |
| homepage | |
| repository | https://github.com/TGRCdev/bevy-butler |
| max_upload_size | |
| id | 1506857 |
| size | 110,274 |
A set of procedural macros for making Bevy plugins and systems more self-documenting.
| bevy | bevy-butler |
|---|---|
0.16 |
0.6 |
0.15 |
0.5 |
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 is currently locked behind the wasm-experimental flag. See the relevant issue for more information.