Skip to main content

pebble/ecs/
plugin.rs

1use crate::app::App;
2
3/// A plugin encapsulates a self-contained piece of functionality that can be
4/// registered with an [`App`].
5///
6/// Plugins are collected and built in [`App::build`]. A plugin's `build`
7/// implementation can add resources, systems, and even other plugins.
8pub trait Plugin: 'static {
9    /// Register this plugin's resources and systems with `app`.
10    fn build(&self, app: &mut App);
11}