Skip to main content

Crate kailash_plugin_macros

Crate kailash_plugin_macros 

Source
Expand description

Proc-macros for the Kailash plugin guest SDK.

Provides #[kailash_plugin] for annotating plugin entry-point functions. The macro generates the WASM ABI kailash_execute export that wraps the user’s function with JSON serialization and memory management.

§Usage

use kailash_plugin_guest::prelude::*;

#[kailash_plugin(
    name = "my-plugin",
    description = "Processes data",
    version = "0.1.0",
)]
fn process(inputs: GuestValueMap) -> Result<GuestValueMap, PluginError> {
    Ok(inputs) // echo
}

Attribute Macros§

kailash_plugin
Marks a function as a Kailash WASM plugin entry point.