Skip to content

thislight/zigpak

Repository files navigation

Zigpak

Messagepack for Zig.

Checks

Supported:

  • Zig 0.12 (best effort)
  • Zig 0.13
  • Zig 0.14 (the master branch)

Use In Your Project

Use a tarball link with zig fetch --save. You can find it in the "Tags" page. Some versions of zig can only fetch "tar.gz" files, so you may prefer this type.

zig fetch --save https://link-to-tarball

Assume the saved name is the default "zigpak". In the build script, refer the "zigpak" module.

// build.zig

pub fn build(b: *std.Build) void {
    // ...
    const exe: *std.Build.Compile;

    const zigpak = b.dependency("zigpak", .{
        .target = target,
        .optimize = optimize,
    }).module("zigpak");

    exe.root_module.addImport("zigpak", zigpak);
}

License

Apache-2.0