nanomessage next generation packaged using the zig build system.
Currently it's only properly tested in linux. If you have a build bug in another platform feel free to open a issue (or better, a PR).
Add the dep to your build.zig.zon
:
# master
zig fetch --save git+https://github.com/Tomcat-42/nng
# tagged release
zig fetch --save https://github.com/Tomcat-42/nng/archive/refs/tags/${tag}.tar.gz
Then in the build.zig
file add the library as a dep:
const nng = b.dependency("nng", .{ .optimize = optimize, .target = target });
compile_target.linklibrary(nng.artifact("nng"));
Then, in your compile target:
const nng = @cImport({
@cInclude("nng/nng.h");
@cInclude("nng/args.h");
@cInclude("nng/http.h");
});