Module protocol

Module protocol 

Source
Expand description

transport-neutral owned-kernel messages, usable from native and wasm32. Payloads contain version/request/op fields; stream length prefixes belong to native transport. No pointers, JS numbers for u64 IDs, or host worker identity cross this boundary. Handles belong to one worker/module incarnation.

Structs§

WireHandle
Kernel-side token. Execution clients must separately enforce worker affinity.

Enums§

BooleanOperation
Numerical Boolean selector; wire codes are fixed by the adapter ABI.
KernelCommand
Numerical commands, independent of scheduling or IFC interpretation. Box/cylinder coordinates are evaluation metres; tolerances are explicit.
KernelResponse
A borrowed response; callers copy/consume it before disposing the transport buffer.
MeshStream
ProtocolError

Constants§

MAX_MESH_CHUNK_SCALARS
MAX_PAYLOAD_BYTES
Original request and legacy response frame bound, including the 12-byte header.
MAX_REQUEST_BYTES
MAX_RESPONSE_BYTES
MAX_SWEEP_CHUNK_BYTES
Largest staged recipe chunk; a chunk request stays below the request bound.
VERSION

Functions§

decode_response
Validate response framing fields before any result bytes are trusted.
encode_request
Encode one bounded payload. IEEE float bits and every u64 token are preserved. Geometric-domain validation is the executing boundary’s responsibility.