Skip to main content

Module proto

Module proto 

Source
Expand description

IPC message protocol for host↔plugin communication.

Every message is a single u8 tag byte followed by tag-specific payloads. Strings are length-prefixed: u32 (little-endian) byte count followed by UTF-8 bytes. Integers are little-endian.

§Wire format

TagDirectionPayload
0x01Request::Ping(empty)
0x02Request::GetMetadataplugin_id: u32
0x03Request::Instantiateplugin_id: u32
0x04Request::Processplugin_id: u32, sample_count: u32
0x81Response::Pong(empty)
0x82Response::Metadataplugin_id: u32 + PluginMetadataPayload
0x83Response::InstanceCreatedplugin_id: u32
0x84Response::InstanceDroppedplugin_id: u32
0x85Response::Processedplugin_id: u32
0xFEResponse::Errorcode: u32, message: String

§Safety

All decode functions are panic-free (fuzz-safe). Malformed input returns PluginError::Sandbox rather than panicking.

Structs§

PluginMetadataPayload
Wire-format metadata payload carried inside Response::Metadata.

Enums§

Request
A host→plugin IPC request.
Response
A plugin→host IPC response.

Functions§

decode_request
Decode a Request from a byte slice.
decode_response
Decode a Response from a byte slice.
encode_request
Encode a Request into a byte buffer.
encode_response
Encode a Response into a byte buffer.