Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,22 @@ pub fn build(b: *std.Build) void {
test_step.dependOn(&run_exe_unit_tests.step);
test_step.dependOn(&run_mcp_unit_tests.step);

// Lint step using zwanzig. Always build the linter with ReleaseFast: it is a
// Lint step using Zwanzig. Always build the linter with ReleaseFast: it is a
// build-time tool and Debug-mode safety/allocator overhead makes analysis
// multiple orders of magnitude slower on x86 Linux runners.
if (b.lazyDependency("zwanzig", .{
.target = target,
const zwanzig = b.dependency("zwanzig", .{
.target = b.graph.host,
.optimize = .ReleaseFast,
})) |zw| {
const zw_exe = zw.artifact("zwanzig");
const lint_run = b.addRunArtifact(zw_exe);
lint_run.addArgs(&.{"src"});
const lint_step = b.step("lint", "Run zwanzig linter");
lint_step.dependOn(&lint_run.step);
}
});
const run_zwanzig = b.addRunArtifact(zwanzig.artifact("zwanzig"));
const target_triple = b.fmt("{s}-{s}", .{
@tagName(target.result.cpu.arch),
@tagName(target.result.os.tag),
});
run_zwanzig.addArgs(&.{ "--target", target_triple, "src" });

const lint_step = b.step("lint", "Run Zwanzig");
lint_step.dependOn(&run_zwanzig.step);
}

// Prefer the active developer selection over hardcoded SDK locations so
Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
.hash = "toml-0.3.0-bV14Bd-EAQBKoXhpYft303BtA2vgLNlxntUCIWgRUl46",
},
.zwanzig = .{
.url = "https://github.com/forketyfork/zwanzig/archive/refs/tags/v0.13.1.tar.gz",
.hash = "zwanzig-0.13.1-oiXZll27GADDlJfUdQH1T7i5bYapXxreg-OrBorzXnmI",
.url = "https://github.com/forketyfork/zwanzig/archive/refs/tags/v0.14.0.tar.gz",
.hash = "zwanzig-0.14.0-oiXZljvxGACKRbJD3WEVSKM_gbCm6GUsrz2_TbFP7xfe",
},
},
.paths = .{
Expand Down
1 change: 1 addition & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ zig build run
## Dependencies and Tooling

- **ghostty-vt** is fetched as a pinned tarball via the Zig package manager (`build.zig.zon`).
- **Zwanzig** is pinned as a Zig build dependency and runs as a host-targeted `ReleaseFast` build tool through `zig build lint`. Architect passes its requested target architecture and operating system to Zwanzig for target-aware analysis.
- **SDL3** and **SDL3_ttf** are provided by Nix. SDL3 is pinned to 3.4.10 via `overlays/sdl3-3-4-10.nix` with binaries cached in the public `forketyfork` Cachix to avoid rebuilds.

## Tests and Formatting
Expand Down