Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

mojo-msgpack v0.1.0

Choose a tag to compare

@amarbarosys amarbarosys released this 04 Nov 14:40
· 11 commits to main since this release

mojo-msgpack v0.1.0

Released: 2026-11-04 · Commit: 0ab9971 · Previous: first release

What it does

MessagePack for Mojo 1.2: an Encoder byte-identical to Python msgpack.packb(use_bin_type=True), and
parse(data) into a flat preorder node table (Doc) that raises on any malformed input.

Highlights

  • Encode 5 to 6 ms vs Python msgpack (C ext) 33 to 34 ms on 100,000 records (4.86 MB); decode x5 110 to 119 ms vs 308 to 320 ms; peak RSS 81 MB vs 139 MB.
  • Every malformed input raises with the byte named: truncation, overrunning lengths (nothing allocated), invalid UTF-8, 0xc1, trailing bytes, nesting past 1024.

Changes

First release, no earlier version.

Verified

Check Result
scripts/ci.sh (check.sh): encode of 2503 trees and decode of 9475 byte strings identical to tools/oracle.py, API errors, doc examples PASS all
scripts/selfcheck.sh: 6 mutants (boundary, depth, UTF-8, trailing bytes, timestamp form, length) PASS selfcheck

Known limits

  • Not covered by the oracle: extension codes below -1 (one checked in tests/api.mojo) and lengths above 2^32-1 on encode.
  • Mojo 1.2 only.

Upgrade / run

mojo run -I src app.mojo

Commits

  • 0ab9971 ci: badge row and checks badge
  • 1270d63 docs(skills): add mojo-msgpack skill
  • 431ddf3 test: property smoke step, encode then parse round trip
  • 70bfb3c build: conda recipe
  • 9e7a7cd docs: one example, one install block
  • ff4a62a docs: install and quickstart block
  • 6c48077 docs: api, design and perf pages with a compiled doc example
  • 40a953f docs: README, changelog, packaging and CI
  • 6b6b22a test: oracle gate, mutant selfcheck and bench against Python msgpack
  • 3fad432 feat: MessagePack encoder and zero-copy parser in pure Mojo