commit 37af24267f08df463c56d5690b15b5a761cef00a Author: Madeorsk Date: Sun Dec 8 21:38:51 2024 +0100 Project setup. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2ae369 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# IDEA +*.iml + +# Zig +zig-out/ +.zig-cache/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..329c780 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# pgzql + +PostgreSQL async driver using Tardy runtime. diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..03d40c6 --- /dev/null +++ b/build.zig @@ -0,0 +1,23 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const pgzql = b.addModule("pgzql", .{ + .root_source_file = b.path("src/root.zig"), + .target = target, + .optimize = optimize, + }); + + const lib_unit_tests = b.addTest(.{ + .root_source_file = b.path("src/root.zig"), + .target = target, + .optimize = optimize, + }); + lib_unit_tests.root_module.addImport("pgzql", pgzql); + const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); + + const test_step = b.step("test", "Run unit tests"); + test_step.dependOn(&run_lib_unit_tests.step); +} diff --git a/build.zig.zon b/build.zig.zon new file mode 100644 index 0000000..425d51c --- /dev/null +++ b/build.zig.zon @@ -0,0 +1,14 @@ +.{ + .name = "pgzql", + .version = "0.1.0", + + .dependencies = .{ + }, + + .paths = .{ + "build.zig", + "build.zig.zon", + "src", + "README.md", + }, +} diff --git a/src/root.zig b/src/root.zig new file mode 100644 index 0000000..95a0b68 --- /dev/null +++ b/src/root.zig @@ -0,0 +1 @@ +const std = @import("std");