Reference layout for an external Oris graph node plugin. Use this crate as a template for packaging your own plugins.
- Plugin type:
plugin_reference/delay - State type:
MessagesState - Config schema:
{ "message": string, "delay_ms"?: number }(defaultdelay_ms: 100) - Minimum oris-runtime:
0.1.x(same major.minor as host app)
Add this crate as a path dependency (or publish and depend on the published crate), then:
use oris_runtime::graph::{MessagesState, NodePluginRegistry, StateGraph, END, START};
use plugin_reference::register_all;
let mut registry = NodePluginRegistry::<MessagesState>::new();
register_all(&mut registry)?;
let mut graph = StateGraph::<MessagesState>::new();
graph.add_plugin_node(
"delayed-step",
plugin_reference::DELAY_NODE_PLUGIN_TYPE,
serde_json::json!({ "message": "Hello from plugin_reference", "delay_ms": 50 }),
®istry,
)?;src/lib.rs: Plugin implementation andregister_allhelper.Cargo.toml: Depends onoris-runtime(path or version) with no required features for the graph plugin API.- This README: Plugin type, config schema, compatibility.
See Plugin Authoring for the full 0.1.x contract and compatibility rules.