Add plugin host architecture and Storm Sewer add-on package
Generic plugin runtime (src/plugin/, HostSession, per-tab plugin_state, command router). QGIS-style add-on layout with plugin.toml and single PluginRegistration. Storm Sewer refactored as reference consumer with dispatch.rs, catchments, LandXML, headless tests (43 passing). Core update.rs decoupled from storm_sewer via CadCommand object-pick hooks. Docs: plugin-architecture.md, plugin-template, PR and issue-78 reply drafts.
This commit is contained in:
parent
1199895f0e
commit
e46701456f
66 changed files with 4538 additions and 141 deletions
14
docs/plugin-template/dispatch.rs
Normal file
14
docs/plugin-template/dispatch.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use crate::plugin::host::HostSession;
|
||||
|
||||
use super::manifest::PLUGIN_ID;
|
||||
|
||||
pub fn handle(host: &mut HostSession<'_>, cmd: &str) -> bool {
|
||||
let _ = (host, PLUGIN_ID);
|
||||
match cmd {
|
||||
"MP_HELLO" => {
|
||||
host.push_info("Hello from my_plugin");
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue