Repository navigation
MessagePack compliance and memory-safety fixes, plus independent standard-I/O APIs without breaking existing callers.
Fixes
- Reject the reserved MessagePack marker
0xc1withTypeMarkerReading, including array elements and map keys/values. Bytes inside data and length fields remain unaffected. Addresses #28. - Validate string lengths before allocating memory or reading string bodies.
- Free owned payload trees without allocation or recursion, including when the allocator is exhausted.
Standard I/O
- Add independent
EncoderandDecoderAPIs borrowing*std.Io.Writerand*std.Io.Reader. - Support runtime
ParseLimitsthroughDecoder.limits. - Handle short underlying transfers through
writeAll/readSliceAll, propagate standard I/O errors, and leave flushing and resource ownership to the caller. - Preserve
PackerIO.init,PackerIO.write/read,packIO(), their existing public fields, and the callback-basedPack/PackWithLimitsAPIs. Existing callers do not need to migrate. - Update English and Chinese documentation with working memory and file examples.
Compatibility and Maintenance
- Continue supporting Zig
0.16.0and Zig0.17.0-dev; development-compiler compatibility may change as Zig evolves. - Remove obsolete pre-0.16 compatibility branches. The minimum supported compiler remains
0.16.0, unchanged from 0.0.18. Use library version0.0.17for Zig 0.15.x and older. - Synchronize
build.zig.zonpackage metadata with release version0.0.19.
Verification
- Release-source tests and documentation generation pass on macOS arm64 with Zig
0.16.0and0.17.0-dev.2131+d08989840: 171/171 tests on each compiler. - The unchanged pre-refactor client test suite passes against the new implementation: 165/165 tests on both compilers. Original constructors, public fields, and stream retargeting were also exercised.
- Native I/O was exercised with allocating writers, tiny-buffer real files, and loopback TCP carrying consecutive messages without requiring EOF.
- All six runnable English/Chinese README examples and the ReleaseFast benchmark suite passed on both compilers during implementation verification.
Full Changelog: 0.0.18...0.0.19