https://github.com/tgrcdev/bevy-butler
Self-documenting systems and simpler plugins in Bevy
https://github.com/tgrcdev/bevy-butler
bevy bevy-engine bevy-plugin game-development gamedev proc-macro rust
Last synced: 10 months ago
JSON representation
Self-documenting systems and simpler plugins in Bevy
- Host: GitHub
- URL: https://github.com/tgrcdev/bevy-butler
- Owner: TGRCdev
- License: apache-2.0
- Created: 2025-01-06T12:42:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-19T09:03:11.000Z (10 months ago)
- Last Synced: 2025-04-19T14:28:10.141Z (10 months ago)
- Topics: bevy, bevy-engine, bevy-plugin, game-development, gamedev, proc-macro, rust
- Language: Rust
- Homepage:
- Size: 315 KB
- Stars: 30
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bevy-butler
A set of procedural macros for making Bevy plugins and systems more self-documenting.

[](https://crates.io/crates/bevy-butler)
[](https://docs.rs/bevy-butler/latest/bevy_butler/)

## Version Compatibility
| bevy | bevy-butler |
|------|-------------|
|`0.15`| `0.5` |
## Example
```rust
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)
{
info!("Hello, {}!", name.0);
}
#[system(schedule = Update, plugin = MyPlugin, after = hello_plugin)]
fn goodbye_plugin(name: Res)
{
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](https://github.com/TGRCdev/bevy-butler/issues/3#issuecomment-2601076962) for more information.