Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1 KB

File metadata and controls

41 lines (29 loc) · 1 KB

libxml2-zig-windows

This binding tested on libxml2 2.12.6 and Zig master version. It's Windows only.

Fetch

$ zig fetch --save=libxml2 https://github.com/doccaico/libxml2-zig-windows/archive/<git-commit-hash>.tar.gz

Usage

// build.zig

const libxml2 = b.dependency("libxml2", .{ .target = target, .optimize = optimize });
exe.linkLibrary(libxml2.artifact("libxml2"));

// src/main.zig

const std = @import("std");

const c = @cImport({
    @cInclude("libxml/xmlreader.h");
});

[your code ...]

See more examples

Tests

$ git clone https://github.com/doccaico/libxml2-zig-windows.git
$ cd libxml2-zig-windows

# Builds all the examples
$ zig build examples

# To list available examples
$ zig build --help

Based on mitchellh/zig-build-libxml2 and ianprime0509/zig-libxml2