chore: port to Zig 0.13.0
All checks were successful
/ test (push) Successful in 39s

This commit is contained in:
LordMZTE 2024-07-02 13:15:08 +02:00
parent b1f6d4a56d
commit 4a6322e7f0
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
4 changed files with 27 additions and 7 deletions

3
.gitignore vendored
View file

@ -1 +1,2 @@
/zig-*
/zig-out
/.zig-cache

View file

@ -4,12 +4,12 @@
.dependencies = .{
.getty = .{
.url = "git+https://github.com/getty-zig/getty.git#d27b9c72c553ee7e9fb383aa955ae1a705cde215",
.hash = "12208cf585a316dddfb837fb7397b0cc4a9974716adf63f856171fbd6e99cb9b131d",
.url = "git+https://github.com/getty-zig/getty.git#78738b665a53db4be85696635b9c832fbca8d273",
.hash = "12204235c113ed912d951e381066d587bb398b7175dc635c50c17864946bbd570879",
},
.@"getty-msgpack" = .{
.url = "git+https://git.mzte.de/lordmzte/getty-msgpack.git#69e7409ce341de8cb58b472fc0cfccd627151d9c",
.hash = "12202ca32a14ed050be486d1b3c1bfa0ba1d91f360c1c992fb63c3ad02a173c24f0c",
.url = "git+https://git.mzte.de/lordmzte/getty-msgpack.git#deb0e1dc33ee4f8240542f584729f2ee6fc24f49",
.hash = "1220a8c39b96992f501dc0733e689ba099ab964ecda720b33070f2ed6251786b2438",
},
},

View file

@ -6,8 +6,8 @@ pub const calls = @import("proto/calls.zig");
pub const nu_target_version = std.SemanticVersion{
.major = 0,
.minor = 94,
.patch = 1,
.minor = 95,
.patch = 0,
};
pub const dbt = .{@import("blocks/union_de.zig")};
@ -518,3 +518,7 @@ pub const Config = struct {
pub const Option = union(enum) {
GcDisabled: bool,
};
pub const Metadata = struct {
version: ?[]const u8 = null,
};

View file

@ -2,10 +2,25 @@ const proto = @import("../proto.zig");
const Connection = @import("../Connection.zig");
pub const PluginCall = union(enum) {
Metadata: Metadata,
Signature: Signature,
Run: Run,
};
pub const Metadata = struct {
pub const name = "Metadata";
pub const Response = proto.Metadata;
pub fn respond(
_: Metadata,
con: *Connection,
id: u64,
meta: proto.Metadata,
) !void {
try con.sendMessage(.{ .CallResponse = .{ id, .{ .Metadata = meta } } });
}
};
pub const Signature = struct {
pub const name = "Signature";
pub const Response = []const proto.PluginSignature;