From fc2088fabb38d8d87b256059e2ff8884e175172c Mon Sep 17 00:00:00 2001 From: yehuthi Date: Wed, 19 Jun 2024 09:26:57 +0300 Subject: [PATCH] add build.zig.zon; update build.zig to zig 0.13 --- build.zig | 12 +++++------- build.zig.zon | 9 +++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 build.zig.zon diff --git a/build.zig b/build.zig index bf88dcf..3dfaca5 100644 --- a/build.zig +++ b/build.zig @@ -1,25 +1,23 @@ const std = @import("std"); -pub fn build(b: *std.build.Builder) void { - // Standard release options allow the person running `zig build` to select - // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const target = b.standardTargetOptions(.{}); _ = b.addModule("jwt", .{ - .source_file = .{ .path = "jwt.zig" }, + .root_source_file = b.path("jwt.zig"), }); const lib = b.addStaticLibrary(.{ .name = "zig-jwt", - .root_source_file = .{ .path = "jwt.zig" }, + .root_source_file = b.path("jwt.zig"), .optimize = optimize, .target = target, }); b.installArtifact(lib); const main_tests = b.addTest(.{ - .root_source_file = .{ .path = "jwt.zig" }, + .root_source_file = b.path("jwt.zig"), }); const run_main_tests = b.addRunArtifact(main_tests); diff --git a/build.zig.zon b/build.zig.zon new file mode 100644 index 0000000..971a942 --- /dev/null +++ b/build.zig.zon @@ -0,0 +1,9 @@ +.{ + .name = "zig-jwt", + .version = "0.0.1", + .paths = .{ + "build.zig", + "build.zig.zon", + "jwt.zig", + }, +}