mirror of
https://github.com/allyourcodebase/zlib.git
synced 2026-11-03 22:55:57 +00:00
zlib ported to the zig build system
- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| README.md | ||
zlib
This is zlib, packaged for Zig.
How to use it
First, update your build.zig.zon:
zig fetch --save https://github.com/allyourcodebase/zlib/archive/refs/tags/1.3.1.tar.gz
Next, add this snippet to your build.zig script:
const zlib_dep = b.dependency("zlib", .{
.target = target,
.optimize = optimize,
});
your_compilation.linkLibrary(zlib_dep.artifact("z"));
This will provide zlib as a static library to your_compilation.