https://github.com/allyourcodebase/libxml2
libxml2 ported to the zig build system
https://github.com/allyourcodebase/libxml2
zig zig-package
Last synced: 11 months ago
JSON representation
libxml2 ported to the zig build system
- Host: GitHub
- URL: https://github.com/allyourcodebase/libxml2
- Owner: allyourcodebase
- License: mit
- Created: 2024-12-18T18:31:19.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-07T15:46:16.000Z (12 months ago)
- Last Synced: 2025-04-05T00:37:01.919Z (11 months ago)
- Topics: zig, zig-package
- Language: Zig
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/allyourcodebase/libxml2/actions)
# libxml2
This is [libxml2](https://gitlab.gnome.org/GNOME/libxml2), packaged for [Zig](https://ziglang.org/).
## Installation
First, update your `build.zig.zon`:
```
# Initialize a `zig build` project if you haven't already
zig init
zig fetch --save git+https://github.com/allyourcodebase/libxml2.git#2.13.5-1
```
You can then import `libxml2` in your `build.zig` with:
```zig
const libxml2_dependency = b.dependency("libxml2", .{
.target = target,
.optimize = optimize,
.iconv = false, // This would link to `libiconv` otherwise
});
your_exe.linkLibrary(libxml2_dependency.artifact("libxml2"));
```