dpp-plugin-sdk
Guest-side SDK and ABI export macro for the Odal Node Wasm product group plugins.
This crate provides the glue and helper utilities that make writing a Wasm product group plugin
straightforward: a single export_plugin! macro generates the linear-memory
ABI (alloc/dealloc) and the standard exports (metadata, describe,
validate, calculate_metrics, generate_passport).
When to use this crate
- You are authoring a Wasm product group plugin and want the standard host/guest ABI wiring without hand-rolling alloc/dealloc and JSON packing.
- You need the helper functions that serialise/deserialise the
Plugin*types defined indpp-plugin-traitsand want to reuse the samedpp_rulesimplementation as the host.
Example
use *;
use Validator;
;
// `meta` and `capabilities` have default implementations — override them only
// if the defaults are wrong for your product group.
//
// Then call the macro exactly once at the crate root to generate the ABI:
//
// dpp_plugin_sdk::export_plugin!(BatteryPlugin);
plugins/product-group-battery is the reference implementation — read it before writing a new one.
Relationship to other crates
| Crate | Role |
|---|---|
dpp-plugin-traits |
Defines the host/guest contract (PluginMeta, PluginCapabilities, DppProductGroupPlugin) |
dpp-rules |
Re-exported rule implementations so plugins share the same rules engine as the host |
Minimum Rust version
1.96 (MSRV is enforced in CI)
License
Apache-2.0 — see LICENSE