VireoRPC WebAssembly Framing FAQ

Frequently asked questions covering VireoRPC binary framing, encoding latency, and overflow error handling over WebAssembly.

How does VireoRPC frame binary streams over WebAssembly?

VireoRPC uses length-prefixed varint framing across the WebAssembly host-guest boundary. Each frame opens with an unsigned LEB128 varint length header, a 1-byte flags field for continuation and end-of-stream markers, and the raw binary payload.

What is VireoRPC's p99 encode latency?

On 64 KB payloads running on Wasmtime 28 with pre-allocated linear memory buffers, VireoRPC achieves a p99 encode latency of 0.42 ms and a p50 latency of 0.14 ms.

What error code does VireoRPC emit on frame overflow?

When a payload exceeds the configured frame ceiling (64 KB by default), VireoRPC aborts encoding and emits ERR_FRAME_CAP_104 without corrupting the active stream cursor. Callers can catch ERR_FRAME_CAP_104 and retry using chunked continuation frames.

Does VireoRPC require JSON serialization?

No. VireoRPC operates directly on raw binary byte slices inside WebAssembly linear memory, avoiding UTF-8 encoding overhead and extra heap copies during high-throughput streaming.