Skip to main content

register_plugin

Macro register_plugin 

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

Registers a struct as the Plugin entry point.

This macro generates the necessary boilerplate to export the WASM component functions expected by the Hydrust host.

§Requirements

The type passed to this macro must:

  1. Implement the Handler trait.
  2. Implement Default (or define a zero-argument new via #[derive(Default)]).

§Example

register_plugin!(MyPlugin);