- Add std.log.scoped(.pugz) to template.zig and view_engine.zig - Log detailed error info (code, line, column, message) when parsing fails - Log template path context in ViewEngine on parse errors - Remove debug print from lexer, use proper scoped logging instead - Move benchmarks, docs, examples, playground, tests out of src/ to project root - Update build.zig and documentation paths accordingly - Bump version to 0.3.1
43 lines
1.1 KiB
Zig
43 lines
1.1 KiB
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
// Get dependencies
|
|
const pugz_dep = b.dependency("pugz", .{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
const httpz_dep = b.dependency("httpz", .{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
// Main executable
|
|
const exe = b.addExecutable(.{
|
|
.name = "demo",
|
|
.root_module = b.createModule(.{
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
.imports = &.{
|
|
.{ .name = "pugz", .module = pugz_dep.module("pugz") },
|
|
.{ .name = "httpz", .module = httpz_dep.module("httpz") },
|
|
},
|
|
}),
|
|
});
|
|
|
|
b.installArtifact(exe);
|
|
|
|
const run_cmd = b.addRunArtifact(exe);
|
|
run_cmd.step.dependOn(b.getInstallStep());
|
|
|
|
if (b.args) |args| {
|
|
run_cmd.addArgs(args);
|
|
}
|
|
|
|
const run_step = b.step("run", "Run the demo server");
|
|
run_step.dependOn(&run_cmd.step);
|
|
}
|