Module serialization

Source
Expand description

Serialization formats we consider using for the bytecode and the witness stack.

EnumsΒ§

Format
A marker byte for the serialization format.

ConstantsΒ§

FORMAT_ENV_VAR πŸ”’

FunctionsΒ§

deserialize_any_format πŸ”’
Deserialize any of the supported formats.
msgpack_deserialize πŸ”’
Deserialize a value using MessagePack, based on serde.
msgpack_serialize πŸ”’
Serialize a value using MessagePack, based on serde.
msgpack_tagged_serialize_acir πŸ”’
Serialize a value through the msgpack_tagged wrapper with the ACIR policy applied: by default everything reachable from value rides on EncodingStrategy::Array (the compact positional shape), and the top-level container types (Program, Circuit, BrilligBytecode) flip to EncodingStrategy::Tagged so they stay schema-evolvable. The overrides use with_strategy_for_name, which never asserts on a registry miss β€” so the same call works when value doesn’t reach any of those containers (e.g. a WitnessMap or a bare leaf type): unreachable names get a stray override entry that’s never looked up at encode time.
serialize_with_format πŸ”’