Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doccaico/libxml2-zig-windows
libxml2 built using Zig build system for Windows
https://github.com/doccaico/libxml2-zig-windows
libxml2 zig
Last synced: about 1 month ago
JSON representation
libxml2 built using Zig build system for Windows
- Host: GitHub
- URL: https://github.com/doccaico/libxml2-zig-windows
- Owner: doccaico
- License: mit
- Created: 2024-04-28T15:02:46.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-03T06:57:26.000Z (9 months ago)
- Last Synced: 2024-11-10T03:30:32.428Z (3 months ago)
- Topics: libxml2, zig
- Language: Zig
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## libxml2-zig-windows
This binding tested on [libxml2](https://github.com/GNOME/libxml2/) 2.12.6 and Zig master version. It's Windows only.
#### Fetch
```sh
$ zig fetch --save=libxml2 https://github.com/doccaico/libxml2-zig-windows/archive/.tar.gz
```#### Usage
```zig
// build.zigconst 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](https://github.com/doccaico/libxml2-zig-windows/tree/main/examples)#### Tests
```sh
$ 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](https://github.com/mitchellh/zig-build-libxml2) and [ianprime0509/zig-libxml2](https://github.com/ianprime0509/zig-libxml2)