miracle_plugin

Macro miracle_plugin 

Source
macro_rules! miracle_plugin {
    ($plugin_type:ty) => { ... };
}
Expand description

Registers a type as a miracle-wm plugin.

The type must implement Default and Plugin. This macro generates all of the required WASM export functions (init, animate, place_new_window, etc.) that the compositor calls at runtime.

§Example

#[derive(Default)]
struct MyPlugin;
impl Plugin for MyPlugin {}
miracle_plugin!(MyPlugin);