nanomsg-next-generation (nng) packaged for the zig build system
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pablo Alessandro Santos Hugen 2d05bd654b
ayc readiness (#2)
* Remove Zig module that re-exports C symbols

* Delete examples folder

* Add build workflow

* Fix lld not supported on mach-o files

* Remove formatting step

* Remove windows and mac workflows

Will support those platforms later.

* Update README
2025-05-16 11:53:57 -03:00
.github/workflows ayc readiness (#2) 2025-05-16 11:53:57 -03:00
.gitignore First Commit 2025-03-31 10:50:23 -03:00
build.zig ayc readiness (#2) 2025-05-16 11:53:57 -03:00
build.zig.zon first version 2025-04-01 15:46:51 -03:00
LICENSE Add readme 2025-04-01 15:52:19 -03:00
README.md ayc readiness (#2) 2025-05-16 11:53:57 -03:00

nng

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).

Usage

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