hush-plugin — Macro for building Hush workflow op plugins as cdylib crates.
Provides the hush_plugin! macro that generates the C ABI exports
required for hush-serve to load your ops at runtime via libloading.
Usage
// In your Cargo.toml:
// [lib]
// crate-type = ["cdylib"]
//
// [dependencies]
// serde_json = "1"
// hush-plugin = { path = "../../rust/hush-plugin" }
hush_plugin!
C ABI Contract
The macro generates three extern "C" functions:
hush_call(name, inputs_json) -> *mut c_char— call a regular ophush_call_generator(name, inputs_json) -> *mut c_char— call a generator ophush_free_str(ptr)— free a string returned by the above
Data crosses the FFI boundary as null-terminated JSON strings. Returns null if the op name is not found.