IPC bridge for WebView ↔ Rust communication
This crate provides the message handling layer between the React UI (running in a WebView) and Rust application logic. It implements JSON-RPC 2.0 style request/response handling with typed message contracts.
Architecture
- ParameterHost trait: Abstracts parameter storage (desktop POC, plugin, etc.)
- IpcHandler: Dispatches JSON-RPC requests to appropriate handlers
- BridgeError: Typed error handling with conversion to IPC error codes
Example
use ;
use ;
// Implement ParameterHost for your application state
;
// Create handler
let handler = new;
// Handle incoming JSON from WebView
let request_json = r#"{"jsonrpc":"2.0","id":1,"method":"ping"}"#;
let response_json = handler.handle_json;