feat: output rendering (JSON/XML/human helpers); musl default build with libc for localtime (M5 part 1)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel SamsonandClaude Sonnet 5.5 committed 2026-10-17 13:36:29 +01:00
1 parent 0d91b0490a
commit bd4e585ed8
4 files changed
+620 -135

No files matched your search

+8
View File
@@ -47,3 +47,11 @@ Guidance for AI coding agents working in `zag`, the Zig port of the
| `src/ipc.zig` | NDJSON-over-Unix-socket server and client |
| `src/service.zig` | Daemon core: recovery, scheduler, IPC handlers, cleanup timer, reload |
| `src/daemon.zig` | pid file, foreground run loop + signals, detached start, stop (TERM/KILL) |
| `src/output.zig` | JSON/XML rendering of a value tree, human helpers (bytes, ages, local time, colour) |
## Build notes
- `build.zig` links libc (for `localtime_r`) and defaults Linux builds to `x86_64-linux-musl` so the
binary is static and does not depend on the host's crt files (the host linker fails on newer gcc
`.sframe` sections).
- Width/fill on a signed integer prints a leading `+` (`{d:0>2}` of an `i64`); cast to unsigned first.