Libreria para gestion de configuracion con: - Definicion declarativa de variables (ConfigVariable) - Engine generico con comptime (inline for + @field) - Persistencia a archivo texto legible - Validacion de valores (rangos, tipos) - Soporte: boolean, integer, float, string, color Extraido y generalizado de zsimifactu/src/config/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
860 B
Zig
29 lines
860 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
// Library module
|
|
const lib_mod = b.addModule("zcatconfig", .{
|
|
.root_source_file = b.path("src/zcatconfig.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
// Tests
|
|
const lib_unit_tests = b.addTest(.{
|
|
.root_module = b.createModule(.{
|
|
.root_source_file = b.path("src/zcatconfig.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
}),
|
|
});
|
|
|
|
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);
|
|
|
|
// Prevent unused variable warning
|
|
_ = lib_mod;
|
|
}
|