Skip to content

Commit 2a01674

Browse files
committed
Fixed zinc dependencies and port
1 parent e34791e commit 2a01674

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

frameworks/Zig/zinc/benchmark_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"default": {
66
"json_url": "/json",
77
"plaintext_url": "/plaintext",
8-
"port": 8080,
8+
"port": 3000,
99
"approach": "Realistic",
1010
"classification": "Fullstack",
1111
"database": "None",

frameworks/Zig/zinc/build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.hash = "1220df8995ceea78a4a37a505fc779ded75725d0606c33fded26103953524dde1619",
1616
},
1717
.mustache = .{
18-
.url = "git+https://github.com/batiati/mustache-zig",
18+
.url = "git+https://github.com/batiati/mustache-zig#ac358646ab9e6123285b90c947ecd40f7966d531",
1919
.hash = "1220cd6e1b49bdd0a568682957dab9a6864554755908f7de990ec7c050f58cf41da2",
2020
},
2121
},

frameworks/Zig/zinc/src/main.zig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ const zinc = @import("zinc");
33
const Datetime = @import("datetime").datetime.Datetime;
44

55
pub fn main() !void {
6+
var gpa = std.heap.GeneralPurposeAllocator(.{ .thread_safe = true }){};
7+
defer _ = gpa.deinit();
8+
const allocator = gpa.allocator();
9+
610
var z = try zinc.init(.{
711
.port = 3000,
8-
.allocator = std.heap.c_allocator,
12+
.allocator = allocator,
913
.num_threads = 16 * @as(u8, @intCast(std.Thread.getCpuCount() catch 1)),
1014
});
1115
defer z.deinit();

frameworks/Zig/zinc/zinc.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COPY build.zig build.zig
1010

1111
RUN dnf install -y zig
1212
RUN zig version
13-
RUN zig build -Doptimize=ReleaseFast
13+
RUN zig build -Doptimize=ReleaseFast
1414
RUN cp /zinc/zig-out/bin/zinc /usr/local/bin
1515

1616
EXPOSE 3000

0 commit comments

Comments
 (0)