Skip to main content

Module ipc

Module ipc 

Source
Expand description

IPC message contracts for WebView ↔ Rust communication

This module defines JSON-RPC 2.0 style messages used for bidirectional communication between the React UI (running in WebView) and the Rust application logic.

§Architecture

  • Request/Response: UI initiates, Rust responds (e.g., setParameter, getParameter)
  • Notifications: Rust pushes updates to UI (e.g., parameter changes from host)

§JSON-RPC 2.0 Compatibility

Messages follow JSON-RPC 2.0 conventions:

  • Requests have id, method, and params
  • Responses have id and either result or error
  • Notifications have method and params but no id

Structs§

GetAllParametersResult
Result of getAllParameters request
GetMeterFrameResult
Result for getMeterFrame method
GetParameterParams
Parameters for getParameter request
GetParameterResult
Result of getParameter request
IpcError
Error returned in IpcResponse
IpcNotification
Notification message sent from Rust to UI (no response expected)
IpcRequest
Request message sent from UI to Rust
IpcResponse
Response message sent from Rust to UI
MeterFrame
Meter frame data for UI visualization.
MeterUpdateNotification
Notification sent from audio binary to browser via dev server
ParameterChangedNotification
Notification sent when a parameter changes (e.g., from host automation)
ParameterInfo
Information about a single parameter
RegisterAudioParams
Parameters for registerAudio request (audio binary → dev server)
RegisterAudioResult
Result of registerAudio request
RequestResizeParams
Parameters for requestResize request
RequestResizeResult
Result of requestResize request
SetParameterParams
Parameters for setParameter request
SetParameterResult
Result of setParameter request (empty success)

Enums§

ParameterType
Parameter type discriminator
RequestId
Request ID can be string or number

Constants§

ERROR_INTERNAL
JSON-RPC internal error
ERROR_INVALID_PARAMS
JSON-RPC invalid method parameters
ERROR_INVALID_REQUEST
JSON-RPC invalid request (malformed structure)
ERROR_METHOD_NOT_FOUND
JSON-RPC method not found
ERROR_PARAM_NOT_FOUND
Parameter not found
ERROR_PARAM_OUT_OF_RANGE
Parameter value out of valid range
ERROR_PARSE
JSON-RPC parse error (invalid JSON)
METHOD_GET_ALL_PARAMETERS
Method: Get all parameters with metadata
METHOD_GET_METER_FRAME
Method: Get current meter frame (peak/RMS levels)
METHOD_GET_PARAMETER
Method: Get single parameter value
METHOD_REGISTER_AUDIO
Method: Register audio client with dev server
METHOD_REQUEST_RESIZE
Method: Request resize of editor window
METHOD_SET_PARAMETER
Method: Set single parameter value
NOTIFICATION_METER_UPDATE
Notification: Meter update from audio binary (push to browser)
NOTIFICATION_PARAMETER_CHANGED
Notification: Parameter changed (push from Rust to UI)