LukasKastern/libjuice
libjuice packaged for the zig build system
b509b6c1f90e4a1d4753e6bde62ffbeb4d10c6bb
This is libjuice, 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/lukaskastern/libjuice.git#v1.6.1
You can then import libjuice
in your build.zig
with:
const libjuice_dependency = b.dependency("libjuice", .{
.target = target,
.optimize = optimize,
});
your_exe.linkLibrary(libjuice_dependency.artifact("juice"));
And use the library like this:
const juice = @cImport({
@cInclude("juice/juice.h");
});
...
The target zig version is 0.14.0