835 B
835 B
homecore-plugin-example
Example WASM plugin for the HOMECORE plugin system (ADR-128 P2).
Demonstrates the complete ADR-128 host ABI round-trip:
plugin_setup— subscribes tosensor.test_tempstate changesplugin_handle_state_changed— setsbinary_sensor.test_alerttoonwhen temp > 25,offwhen temp < 20
Build
# Ensure the wasm32 target is installed (once)
rustup target add wasm32-unknown-unknown
# Build the example plugin (from this directory)
cargo build --target wasm32-unknown-unknown --release -p homecore-plugin-example
Output: target/wasm32-unknown-unknown/release/homecore_plugin_example.wasm
Run the integration test
# From v2/
cargo test -p homecore-plugins --features wasmtime
ABI
See homecore-plugins/src/host_abi.rs for the authoritative host ABI spec.