Skip to main content

Crate vexil_runtime

Crate vexil_runtime 

Source
Expand description

§vexil-runtime

Runtime support library for Vexil generated code. Provides the Pack and Unpack traits plus BitWriter / BitReader for LSB-first bit-packed encoding and decoding.

This crate is a dependency of code generated by vexilc codegen. You generally don’t use it directly — the generated Pack and Unpack impls call into it.

§Encoding Model

  • Sub-byte fields are packed LSB-first within each byte
  • Multi-byte integers use little-endian byte order
  • @varint fields use unsigned LEB128
  • @zigzag fields use ZigZag encoding + LEB128
  • Strings and byte arrays are length-prefixed with LEB128

Re-exports§

pub use bit_reader::BitReader;
pub use bit_writer::BitWriter;
pub use error::DecodeError;
pub use error::EncodeError;
pub use handshake::HandshakeResult;
pub use handshake::SchemaHandshake;
pub use traits::Pack;
pub use traits::Unpack;

Modules§

bit_reader
bit_writer
error
handshake
Schema handshake helpers for connection-time identity checking.
leb128
traits
zigzag

Constants§

MAX_BYTES_LENGTH
Maximum allowed byte length for strings and byte arrays (64 MiB).
MAX_COLLECTION_COUNT
Maximum allowed element count for collections (16 M items).
MAX_LENGTH_PREFIX_BYTES
Maximum number of bytes consumed when reading a LEB128 length prefix.
MAX_RECURSION_DEPTH
Maximum nesting depth for recursive types.