https://github.com/allyourcodebase/zlib
zlib ported to the zig build system
https://github.com/allyourcodebase/zlib
zig-package
Last synced: 7 months ago
JSON representation
zlib ported to the zig build system
- Host: GitHub
- URL: https://github.com/allyourcodebase/zlib
- Owner: allyourcodebase
- License: mit
- Created: 2023-10-14T19:30:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-07T00:25:15.000Z (12 months ago)
- Last Synced: 2025-05-02T04:34:55.718Z (10 months ago)
- Topics: zig-package
- Language: Zig
- Homepage:
- Size: 8.79 KB
- Stars: 56
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zlib
This is [zlib](https://www.zlib.net/),
packaged for [Zig](https://ziglang.org/).
## 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:
```zig
const zlib_dep = b.dependency("zlib", .{
.target = target,
.optimize = optimize,
});
your_compilation.linkLibrary(libz_dep.artifact("z"));
```
This will provide zlib as a static library to `your_compilation`.