kassane/zig-libxml2 — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2024-02-18
Cross-compile libxml2 for Windows, Mac, and Linux from a single machine using Zig.
Link XML parsing into a Zig project without hand-writing a custom build script for libxml2.
Toggle libxml2 features like compression or encoding conversion through simple build options.
| kassane/zig-libxml2 | kassane/cppfront-zigbuild | pkazmier/jsonfetch | |
|---|---|---|---|
| Stars | 2 | 1 | 1 |
| Language | Zig | Zig | Zig |
| Last pushed | 2024-02-18 | 2025-11-21 | 2025-09-13 |
| Maintenance | Dormant | Quiet | Quiet |
| Setup difficulty | moderate | easy | moderate |
| Complexity | 3/5 | 1/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
libxml2's version is hardcoded and installed via git submodule since there's no Zig package manager yet.
This repo lets you build libxml2, a widely-used C library for parsing XML, using the Zig build system. The main benefit is that Zig's build system makes cross-compilation much easier, even if your project isn't written in Zig. So if you need to produce libxml2 binaries for different platforms (say, Windows, Mac, and Linux) from a single machine, this simplifies that process. At a high level, the repository wraps libxml2's source code in Zig build scripts. You bring it into your project (currently via git submodules or by embedding it), then call a function in your build file to create the library and link it to your program. The build accepts options to toggle features like compression support (zlib, lzma) or character encoding conversion (iconv). If you enable those features, you need to have the corresponding libraries available. This is aimed at developers already using the Zig build system who need XML parsing in their programs. Since the project doesn't provide Zig-friendly wrappers around libxml2's functions, you interact with the library through its standard C interface, importing the C headers and calling those functions directly. The focus is strictly on making the build and linking step smoother, not on redesigning how you use the library. A couple of things worth noting: the libxml2 version is currently hardcoded, so it may lag behind official releases over time. The author hopes to eventually allow pointing to a custom libxml2 directory and automating version updates, but that isn't in place yet. The project is also waiting on a proper Zig package manager, which would make installation cleaner than the current submodule approach.
Lets you build the libxml2 C library using Zig's build system, making it much easier to cross-compile XML parsing support for multiple platforms from one machine.
Mainly Zig. The stack also includes Zig, C, libxml2.
Dormant — no commits in 2+ years (last push 2024-02-18).
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.