Skip to content

vox-plugin-sdk API Reference (generated)

Crate: vox-plugin-sdk · Version: 0.6.0 · Target: Library (lib.rs)

Authoring SDK for Vox code plugins: re-exports the stable plugin ABI + the declare_plugin! glue macro so plugins drop ~25 lines of identical dylib-export boilerplate. ABI-neutral (byte-identical exports).

Ergonomic authoring surface for Vox code plugins. It re-exports the stable plugin ABI ([vox_plugin_api]) plus the [abi_stable] types plugin authors need, and provides the [declare_plugin!] macro that emits the dylib export glue (root_module / manifest_json / init) every plugin otherwise hand-copies.

The SDK adds zero new ABI surface — declare_plugin! expands to exactly the #[export_root_module] + #[sabi_extern_fn] pattern plugins write by hand today, so a macro-built plugin and a hand-built one produce byte-identical exports. Because the macro stamps [vox_plugin_api::VOX_PLUGIN_ABI_VERSION] (not a hard-coded number) and plugins implement the [VoxPlugin] trait from vox-plugin-api directly, new extension points are picked up on recompile without touching the SDK. See docs/superpowers/plans/2026-06-06-plugin-sdk-and-abi-sync.md.

use vox_plugin_sdk::prelude::*;
#[derive(Clone)]
struct MyPlugin;
impl VoxPlugin for MyPlugin {
fn id(&self) -> RString { RString::from("my-plugin") }
fn shutdown(&self) -> RResult<(), RBoxError> { ROk(()) }
// ...optional `as_*` extension accessors...
}
vox_plugin_sdk::declare_plugin! {
// id + version are read from the crate's Plugin.toml — no duplication.
init: |_host| ROk(wrap(MyPlugin)),
}
DependencyKind
vox-plugin-apiNormal
ModuleDescription
preludeGlob-import surface for plugin authors: use vox_plugin_sdk::prelude::*;.
FunctionDescription
wrapWrap a concrete [VoxPlugin] value into the stable-ABI trait object the host loads. Equivalent to the hand-written VoxPlugin_TO::from_value(plugin, TD_Opaque).
manifest_id_version_jsonBuild the manifest_json ABI probe ({"id":..,"version":..}) from an embedded Plugin.toml string. Used by [declare_plugin!] so id/version have a single authoring site (the manifest) rather than being re-typed as macro arguments. On a parse failure or a missing [plugin] id/version, falls back to empty/0.0.0 — the host reads the real Plugin.toml from disk anyway; this probe is advisory.
Dependency Topology, diagram 15 nodes, 4 edges: vox-plugin-sdk → vox-plugin-api; vox-cli-research → vox-plugin-sdk; vox-plugin-nvml-probe → vox-plugin-sdk; vox-plugin-speech → vox-plugin-sdkvox-plugin-sdkvox-plugin-apivox-cli-researchvox-plugin-nvml-probevox-plugin-speech
Diagram source
graph {
direction: right
node vox_plugin_sdk: "vox-plugin-sdk"
node vox_plugin_api: "vox-plugin-api"
vox_plugin_sdk -> vox_plugin_api
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_plugin_sdk
node vox_plugin_nvml_probe: "vox-plugin-nvml-probe"
vox_plugin_nvml_probe -> vox_plugin_sdk
node vox_plugin_speech: "vox-plugin-speech"
vox_plugin_speech -> vox_plugin_sdk
}
Consumer CrateRole
vox-cli-researchDirect workspace dependent
vox-plugin-nvml-probeDirect workspace dependent
vox-plugin-speechDirect workspace dependent
KindSymbolSignatureSourceDescription
fnwrappub fn wrap<P>(plugin: P) -> VoxPluginRefcrates/vox-plugin-sdk/src/lib.rs#L49Wrap a concrete [VoxPlugin] value into the stable-ABI trait object the host loads. Equivalent to the hand-written VoxPlugin_TO::from_value(plugin, TD_Opaque).
fnmanifest_id_version_jsonpub fn manifest_id_version_json(manifest_toml: &str) -> std_types::RStringcrates/vox-plugin-sdk/src/lib.rs#L62-L79Build the manifest_json ABI probe ({"id":..,"version":..}) from an embedded Plugin.toml string. Used by [declare_plugin!] so id/version have a single authoring site (the manifest) rather than being re-typed as macro arguments. On a parse failure or a missing [plugin] id/version, falls back to empty/0.0.0 — the host reads the real Plugin.toml from disk anyway; this probe is advisory.