diff --git a/README.md b/README.md index 47c3b1e..02567bb 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ The standard workflows around publishing and subscribing to messages seem to wor # Zig Version Support -Since the language is still under active development, any written Zig code is a moving target. The master branch targets zig `0.12`, `0.13`, and `0.14-dev` (though it is not guaranteed to work with all versions. Check the commit history for specific version updates). +Since the language is still under active development, any written Zig code is a moving target. The master branch targets zig `0.14`. # Using -These bindings are ready-to-use with the Zig package manager. With Zig 0.13, this means you will need to create a `build.zig.zon` and modify your `build.zig` to use the dependency. +These bindings are ready-to-use with the Zig package manager. This means you will need to create a `build.zig.zon` and modify your `build.zig` to use the dependency. ```sh # bootstrap your zig project if you haven't already diff --git a/build.zig.zon b/build.zig.zon index e9cf7aa..30698a4 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,8 @@ .{ - .name = "nats_client", + .name = .nats_client, + .fingerprint = 0x7B8B5B9E2C2BD086, .version = "0.1.0", + .minimum_zig_version = "0.14.0", .paths = .{ "src", "build.zig", @@ -9,8 +11,8 @@ }, .dependencies = .{ .nats_c = .{ - .url = "git+https://github.com/allyourcodebase/nats.c.git?ref=3.9.1#be5a084d6e235de157e6183533b2575f413afc82", - .hash = "122052af6a8b2a226de6422b9f50140ea97e9fe27995d0aa257b7c773d41b20a414c", + .url = "git+https://github.com/allyourcodebase/nats.c.git?ref=3.9.1+1#6e6c26f0ebb63ca55913f5a60c9c762cb598b117", + .hash = "nats_c-3.9.1-0V8jnIpSAABnRZjGhKu7GzOKPWzb-JB35jspoD_AfLvm", }, }, } diff --git a/src/message.zig b/src/message.zig index e463519..ff593ab 100644 --- a/src/message.zig +++ b/src/message.zig @@ -68,7 +68,7 @@ pub const Message = opaque { } pub fn getHeaderValue(self: *Message, key: [:0]const u8) Error![:0]const u8 { - var value: ?[*:0]u8 = null; + var value: [*c]const u8 = null; const status = Status.fromInt(nats_c.natsMsgHeader_Get(@ptrCast(self), key.ptr, &value)); return status.toError() orelse std.mem.sliceTo(value.?, 0); diff --git a/src/thunk.zig b/src/thunk.zig index c8972cd..5592cb7 100644 --- a/src/thunk.zig +++ b/src/thunk.zig @@ -51,7 +51,7 @@ pub fn checkUserDataType(comptime T: type) void { else => checkUserDataType(info.child), }, pointer => |info| switch (info.size) { - .Slice => @compileError( + .slice => @compileError( "nats callbacks can only accept void or an (optional) single, many," ++ " or c pointer as userdata, not slices. \"" ++ @typeName(T) ++ "\" appears to be a slice.",