hm-plugin-sdk 0.0.1

Authoring SDK for hm plugins. Wraps extism-pdk with hm-specific traits and macros.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use hm_plugin_protocol::{ExitInfo, PluginError};

pub use hm_plugin_protocol::SubcommandInput;

pub trait SubcommandPlugin {
    /// Run the subcommand.
    ///
    /// # Errors
    /// Returns a [`PluginError`] describing the failure. The host
    /// renders the error and exits the process with code 1.
    fn run(&self, input: SubcommandInput) -> Result<ExitInfo, PluginError>;
}