zlib-ng for the Zig build system
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Caleb J. Gardner 5867bc58a1 Updated fetch URL
2026-10-18 21:09:23 -05:00
.gitignore Added zlib_compat option 2026-06-02 18:29:48 -05:00
build.zig Update to zig 0.17.0 2026-10-08 23:53:40 -05:00
build.zig.zon Update to zig 0.17.0 2026-10-08 23:53:40 -05:00
LICENSE Add LICENSE 2026-03-10 08:30:50 -05:00
README.md Updated fetch URL 2026-10-18 21:09:23 -05:00

zlib-ng

zlib-ng packaged for zig.

How to use it

First, update your build.zig.zon:

zig fetch --save git+https://git.darkstorm.tech/BelacDarkstorm/zig-zlib-ng.git

Next, add this snippet to your build.zig script:

const zlib_ng_dep = b.dependency("zlib_ng", .{
    .target = target,
    .optimize = optimize,
});
your_compilation.linkLibrary(zlib_ng_dep.artifact("zng"));

This will provide zlib-ng as a static library to your_compilation.

Current State

Currently most optimization flags have been ported over, but some may be improperly added, needs to have more restrictions on when they are added, or be tested on if they can be added properly. Additionally, I only have limited hardware to actually test everything on (Linux x86_64) so flags for other platforms/architectures are untested.