Commit d90106a
committed
feat(plugins): add WASM host functions for plugin communication
Implements the host-side functions that WASM plugins can call:
- log(level, msg_ptr, msg_len) - Log at specified level
- get_context() -> i64 - Get execution context as JSON
- register_widget(region, type_ptr, type_len) -> i32 - Register UI widget
- register_keybinding(key_ptr, key_len, action_ptr, action_len) -> i32 - Register keybinding
- show_toast(level, msg_ptr, msg_len, duration_ms) -> i32 - Show toast notification
- emit_event(name_ptr, name_len, data_ptr, data_len) -> i32 - Emit custom event
The host functions are wired to the WASM runtime via wasmtime's Linker,
allowing plugins to call back into the host system.1 parent bef6989 commit d90106a
3 files changed
Lines changed: 605 additions & 6 deletions
0 commit comments