add build.zig.zon; update build.zig to zig 0.13

master
yehuthi 2024-06-19 09:26:57 +03:00 committed by geemili
parent 390ffd6732
commit fc2088fabb
2 changed files with 14 additions and 7 deletions

View File

@ -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);

9
build.zig.zon Normal file
View File

@ -0,0 +1,9 @@
.{
.name = "zig-jwt",
.version = "0.0.1",
.paths = .{
"build.zig",
"build.zig.zon",
"jwt.zig",
},
}