Skip to main content

Module msgpack_module

Module msgpack_module 

Source
Expand description

Native msgpack module for MessagePack encoding and decoding.

Exports: msgpack.encode(value), msgpack.decode(data), msgpack.encode_bytes(value), msgpack.decode_bytes(data)

Phase 1.B (ADR-006 §2.7.4) status: ALL FOUR FUNCTIONS REMAIN DEFERRED pending the N4 (any-input typed marshal) and N6 (any-output typed marshal) architectural decisions per docs/defections.md HashMap-marshal cluster’s sub-decision queue.

  • msgpack.encode(value: any) and msgpack.encode_bytes(value: any) take a polymorphic value: any input parameter that maps to the N4 architectural surface. There is no FromSlot impl for an any-typed input in the post-bulldozer typed marshal layer (ConcreteType::Any exists as a RETURN type only).
  • msgpack.decode(data: string) and msgpack.decode_bytes(data: Array<int>) return Result<any> — the decoded payload is a recursive serde_json::Value-equivalent tree with no current ConcreteReturn::Any representation, mapping to the N6 architectural surface.

Until N4 + N6 land, the bodies use the variadic register_typed_function shape (per ADR-006 §2.7.4 ruling) but return Err(...) rather than emit a partial / unsound serializer. The schemas + ModuleParam declarations remain so the LSP surface is unaffected. New typed-marshal test fixtures arrive with the shape-vm cleanup workstream.

Functions§

create_msgpack_module
Create the msgpack module with MessagePack encoding and decoding functions.