Skip to main content

Module codec

Module codec 

Source
Expand description

VectorizerRPC frame codec — [u32 LE len][MessagePack body].

Wire spec § 1: docs/specs/VECTORIZER_RPC.md.

This module used to be a byte-for-byte hand-port of the server’s vectorizer::protocol::rpc::codec. Under phase4_split-vectorizer-workspace sub-phase 6 the server’s codec moved into the standalone vectorizer-protocol crate; this module now re-exports it so the SDK and the server cannot disagree on framing — they’re literally the same Rust functions compiled from the same source.

Constants§

MAX_BODY_SIZE
Maximum body size accepted on the wire. Frames declaring a larger length crash the connection rather than allocate. 64 MiB is the documented cap in wire spec § 1.

Functions§

decode_frame
Decode one frame from a byte slice.
encode_frame
Encode any Serialize value into a length-prefixed MessagePack frame.
read_request
Read one Request frame from an async reader.
read_response
Read one Response frame from an async reader. Used by client implementations and round-trip tests.
write_request
Write a Request frame to an async writer.
write_response
Write a Response frame to an async writer.