pub async fn main_loop<T: PluginInfo + Send + Sync + 'static>(plugin_info: T)Expand description
The main loop for a plugin.
Bootstraps the communication with reaction core on the process’ stdin and stdout, then holds the connection and maintains the plugin in a server state.
Your main function should only create a struct that implements PluginInfo
and then call main_loop:
ⓘ
#[tokio::main]
async fn main() {
let plugin = MyPlugin::default();
reaction_plugin::main_loop(plugin).await;
}