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
| Tag | Direction | Payload |
|---|---|---|
0x01 | Request::Ping | (empty) |
0x02 | Request::GetMetadata | plugin_id: u32 |
0x03 | Request::Instantiate | plugin_id: u32 |
0x04 | Request::Process | plugin_id: u32, sample_count: u32 |
0x81 | Response::Pong | (empty) |
0x82 | Response::Metadata | plugin_id: u32 + PluginMetadataPayload |
0x83 | Response::InstanceCreated | plugin_id: u32 |
0x84 | Response::InstanceDropped | plugin_id: u32 |
0x85 | Response::Processed | plugin_id: u32 |
0xFE | Response::Error | code: u32, message: String |
§Safety
All decode functions are panic-free (fuzz-safe). Malformed input returns
PluginError::Sandbox rather than panicking.
Structs§
- Plugin
Metadata Payload - Wire-format metadata payload carried inside
Response::Metadata.
Enums§
Functions§
- decode_
request - Decode a
Requestfrom a byte slice. - decode_
response - Decode a
Responsefrom a byte slice. - encode_
request - Encode a
Requestinto a byte buffer. - encode_
response - Encode a
Responseinto a byte buffer.