This is an implementation of MessagePack for Zig.
an article introducing it: Zig Msgpack
- Supports all MessagePack types(except timestamp)
- Efficient encoding and decoding
- Simple and easy-to-use API
The current protocol implementation has been completed, but it has not been fully tested. Only limited unit testing has been conducted, which does not cover everything.
About 0.13 and previous versions, please use
0.0.6
- Add to
build.zig.zon
zig fetch --save https://github.com/zigcc/zig-msgpack/archive/{commit or branch}.tar.gz
# Of course, you can also use git+https to fetch this package!
- Config
build.zig
// To standardize development, maybe you should use `lazyDependency()` instead of `dependency()`
const msgpack = b.dependency("zig-msgpack", .{
.target = target,
.optimize = optimize,
});
// add module
exe.root_module.addImport("msgpack", msgpack.module("msgpack"));