Skip to content

mojo-messagepack

mojo-messagepack is a MessagePack serializer written in Mojo. The runtime and the code generator are Mojo. They do not wrap msgpack-c or any other C, C++, or Rust MessagePack library.

  • Why MessagePack


    What MessagePack is, how type bytes work, how str differs from bin, and how maps, extensions, timestamps, and streams fit together.

    Read Why MessagePack

  • Instructions


    Install Mojo 1.1.0 with pixi, write a JSON Schema, generate Mojo, run the tests, and publish this site.

    Open Instructions

  • Examples


    Encode and decode generated types, MsgpackValue, timestamps, and concatenated objects.

    See Examples

  • Techniques


    How encode and decode work: pre-sized writes, 256-way type dispatch, memcpy of str/bin, expected-order keys, and which ideas were measured and dropped.

    Read Techniques

  • Test data


    What lives under testdata/ (schemas, oracle bytes, fail-path goldens) and why each file is there.

    Read Test data