allyourcodebase/libxml2
libxml2 ported to the zig build system
61e7df7e996ec5a5f13a653db3c419adb340d6ef
d86666233f4e0045b586060260e8a6093f5cdd8d
497c381e41437856527b7a00b66e75af3f1f7dcc
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#2.14.3-4
You can then import libxml2
in your build.zig
with:
const libxml2_dependency = b.dependency("libxml2", .{
.target = target,
.optimize = optimize,
});
your_exe.linkLibrary(libxml2_dependency.artifact("xml"));