This commit is contained in:
abux 2026-07-28 20:57:38 +02:00
commit 3fbf9ecf85
4 changed files with 96 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.zig-cache/
zig-out/
zig-pkg/

50
build.zig Normal file
View file

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

30
build.zig.zon Normal file
View file

@ -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",
},
}

13
src/main.zig Normal file
View file

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