commit 3fbf9ecf85fff59bb39a9a761c89585c9cf3cdb0 Author: abux Date: Tue Jul 28 20:57:38 2026 +0200 Start diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03cb27d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.zig-cache/ +zig-out/ +zig-pkg/ diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..6610001 --- /dev/null +++ b/build.zig @@ -0,0 +1,50 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const exe = b.addExecutable(.{ + .name = "nyx_engine", + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + + .target = target, + .optimize = optimize, + + .imports = &.{}, + }), + }); + + b.installArtifact(exe); + + const run_step = b.step("run", "Run the app"); + + const run_cmd = b.addRunArtifact(exe); + run_step.dependOn(&run_cmd.step); + + run_cmd.step.dependOn(b.getInstallStep()); + + if (b.args) |args| { + run_cmd.addArgs(args); + } + + const exe_tests = b.addTest(.{ + .root_module = exe.root_module, + }); + + const run_exe_tests = b.addRunArtifact(exe_tests); + + const test_step = b.step("test", "Run tests"); + test_step.dependOn(&run_exe_tests.step); + + // + // DEPENDANCIES + // + + const app = b.dependency("app", .{ + .target = target, + .optimize = optimize, + }); + exe.root_module.addImport("app", app.module("app")); +} diff --git a/build.zig.zon b/build.zig.zon new file mode 100644 index 0000000..1bb5750 --- /dev/null +++ b/build.zig.zon @@ -0,0 +1,30 @@ +.{ + .name = .nyx_engine, + + .version = "0.0.0", + + .fingerprint = 0x83e6816e479a41de, + + .minimum_zig_version = "0.16.0", + + .dependencies = .{ + .zla = .{ + .url = "git+http://2.120.146.66:25569/abux/zla.git#795d1c47a772ec46b34a52e2adf79c323088e55d", + .hash = "zla-0.0.0-z62_impQAABHbrWUmoFLsl_HuD8CNS-k91z6laMJEQ62", + }, + .app = .{ + .url = "git+http://2.120.146.66:25569/abux/NYXA.git#9cbd0804a6008243b4cff387285a5e09cf1e03ed", + .hash = "app-0.0.0-AOV9_YDvAAAjjuCldX-9p7mt3Oswbv8bTB2rvcZ67Fn1", + }, + .gtl = .{ + .url = "git+http://2.120.146.66:25569/abux/gtl.git#3c7fcfcb1276b76ec4695ce5ce9dba4d8255a176", + .hash = "gtl-0.0.0-e3QoJMRYAADChgXn2sogTxsbUpEBSHjOGZeoEx4ccMMD", + }, + }, + + .paths = .{ + "build.zig", + "build.zig.zon", + "src", + }, +} diff --git a/src/main.zig b/src/main.zig new file mode 100644 index 0000000..2a3efb9 --- /dev/null +++ b/src/main.zig @@ -0,0 +1,13 @@ +//! ---------------------------------------------------- +//! ---------------------------------------------------- + +const std = @import("std"); +const App = @import("app"); + +/// ---------------------------------------------------- +/// ---------------------------------------------------- +pub fn main(init: std.process.Init) !void { + // --- APP --- + var app: App = .init(init.gpa); + defer app.deinit(); +}