Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire protocol types for host-renderer communication.

IncomingMessage is deserialized from the host. OutgoingEvent and response types are serialized back. The transport (stdin/stdout, socket, test harness) is handled by the binary crate, not here.

Every wire message carries a session field identifying the logical session it belongs to. SessionMessage pairs a session ID with a deserialized IncomingMessage. All outgoing types include a session field that echoes the originating session ID back.

Structs§

EffectResponse
Response to an effect request, written to stdout as JSONL.
ExtensionCommandItem
A single item within an ExtensionCommands batch.
InteractResponse
Response to an Interact message.
KeyModifiers
Serializable representation of keyboard modifiers.
OutgoingEvent
An event written to stdout by the renderer.
PatchOp
A single patch operation applied incrementally to the retained tree.
QueryResponse
Response to a Query message.
ResetResponse
Response to a Reset message.
SessionMessage
An incoming message paired with its session ID.
TreeHashResponse
Response to a TreeHash message.
TreeNode
A single node in the UI tree.

Enums§

IncomingMessage
Messages sent from the host to the renderer over stdin.

Constants§

PROTOCOL_VERSION
Protocol version number. Sent in the hello handshake message on startup and checked against the value the host embeds in Settings.