No description
  • Zig 69.7%
  • Python 30.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Fynn Mahringer 634f6c1747
Some checks failed
release / security (push) Failing after 3s
release / release (push) Has been skipped
chore: use local trivy runner directly
2026-09-02 19:22:47 +02:00
.forgejo/workflows chore: use local trivy runner directly 2026-09-02 19:22:47 +02:00
example feat: add zig-neuipc zig port 2026-08-06 07:49:13 +02:00
scripts chore: add forgejo release workflow 2026-09-02 19:18:27 +02:00
src feat: add zig-neuipc zig port 2026-08-06 07:49:13 +02:00
.gitignore feat: add zig-neuipc zig port 2026-08-06 07:49:13 +02:00
build.zig feat: add zig-neuipc zig port 2026-08-06 07:49:13 +02:00
build.zig.zon feat: add zig-neuipc zig port 2026-08-06 07:49:13 +02:00
README.md feat: add zig-neuipc zig port 2026-08-06 07:49:13 +02:00

zig-neuipc

zig 0.16 bindings and a Zig-friendly wrapper for neuipc, the lightweight Unix domain socket IPC layer for Wayland compositors.

The intent is to keep the line-oriented command and subscription model of the C library, while giving Zig code a simpler surface for commands, events, and socket lifecycle handling.

Build

Validate the Zig wrapper and generated IPC bindings:

zig build

Build the example programs:

zig build -Dexample=true

Run the demo server and client from the repository root:

./zig-out/bin/example-server
./zig-out/bin/example-client ping
./zig-out/bin/example-client sub heartbeat

Protocol

Commands are sent as a single line:

command arg1 arg2

Replies are:

ok <msg>
err <msg>

Subscriptions use:

sub <topic>
sub *

The connection stays open after subscription, and the server pushes topic <msg> lines as events occur.

The example binaries use an abstract Unix socket name so they do not depend on filesystem socket cleanup during local testing.

API

The intended Zig surface mirrors the C library closely, but should read like a native Zig API:

var server = try neuipc.Server.init(allocator, "/tmp/neuipc.sock");
defer server.deinit();

try server.register("ping", handlePing, null);
try server.dispatch();
_ = try server.emit("heartbeat", "tick {}", .{tick});