This is libxml2, packaged for Zig.
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
You can then import libxml2
in your build.zig
with:
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"));