Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/allyourcodebase/libxml2

libxml2 ported to the zig build system
https://github.com/allyourcodebase/libxml2

zig zig-package

Last synced: 7 days ago
JSON representation

libxml2 ported to the zig build system

Awesome Lists containing this project

README

        

[![CI](https://github.com/allyourcodebase/libxml2/actions/workflows/ci.yaml/badge.svg)](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
```

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"));
```