Function nu_plugin::serve_plugin
source · pub fn serve_plugin(plugin: &impl Plugin, encoder: impl PluginEncoder + 'static)
Expand description
Function used to implement the communication protocol between nushell and an external plugin.
When creating a new plugin this function is typically used as the main entry point for the plugin, e.g.
fn main() {
serve_plugin(&MyPlugin::new(), MsgPackSerializer)
}