Files
pxpipe/src/zig/build.zig
T
teamchong f20207cd7b Rename: claude-image-proxy -> pixelpipe (Tier 1: code + docs)
Project rename for the Show HN launch with framing:
  'pixelpipe — what if Opus saw a UI instead of just append-only logs?'

Renamed everywhere:
  - kebab-case 'claude-image-proxy' -> 'pixelpipe' (42 occurrences)
  - snake_case 'claude_image_proxy' -> 'pixelpipe'  (5 occurrences)
  - 14 files touched: package.json, Cargo.toml, Cargo.lock, *.md,
    bin/cli.js, scripts/install.js, src/proxy.py, src/rust/src/main.rs,
    src/rust/examples/{render_sample,transform_only,diff_render}.rs,
    src/zig/build.zig

Effects on build artifacts:
  - npm package name -> 'pixelpipe'
  - Rust binary name -> target/release/pixelpipe (was claude-image-proxy)
  - Python cache dir -> ~/.cache/pixelpipe/ (was ~/.cache/claude-image-proxy/)

NOT YET DONE in this commit (Tier 2+3, handled in next commit):
  - Repo on-disk directory still ~/Downloads/repos/claude-image-proxy/
  - Cache dir on disk still ~/.cache/claude-image-proxy/ — Python proxy
    currently writes here. Will be migrated alongside the running services
    in a coordinated stop/move/restart sequence.

Validation: scripts/diff_transform.py still produces exactly 1 structural
diff (the PNG bytes, expected — different fonts Python/Menlo vs
Rust/JetBrains Mono). No regression from the rename.
2026-05-18 14:16:48 -04:00

56 lines
2.1 KiB
Zig

//! Zig 0.16 build for pixelpipe.
//!
//! Targets:
//! zig build # build all
//! zig build render-cli # standalone CLI that renders text → PNG (verifies pipeline)
//! zig build test # run renderer tests
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// Find libdeflate. Allow override via LIBDEFLATE_DIR env var; otherwise
// expect the user to either vendor it or have it on the system path.
const libdeflate_dir = b.graph.environ_map.get("LIBDEFLATE_DIR");
const render_exe = b.addExecutable(.{
.name = "render_cli",
.root_module = b.createModule(.{
.root_source_file = b.path("render_cli.zig"),
.target = target,
.optimize = optimize,
}),
});
render_exe.root_module.link_libc = true;
if (libdeflate_dir) |dir| {
render_exe.root_module.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include", .{dir}) });
render_exe.root_module.addLibraryPath(.{ .cwd_relative = b.fmt("{s}/lib", .{dir}) });
} else {
// Try Homebrew on macOS arm64 by default
render_exe.root_module.addIncludePath(.{ .cwd_relative = "/opt/homebrew/include" });
render_exe.root_module.addLibraryPath(.{ .cwd_relative = "/opt/homebrew/lib" });
}
render_exe.root_module.linkSystemLibrary("deflate", .{});
b.installArtifact(render_exe);
const run_render = b.addRunArtifact(render_exe);
if (b.args) |args| run_render.addArgs(args);
const run_step = b.step("render-cli", "Run render_cli to test the pipeline");
run_step.dependOn(&run_render.step);
// Unit tests
const tests = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("menlo5.zig"),
.target = target,
.optimize = optimize,
}),
});
const run_tests = b.addRunArtifact(tests);
const test_step = b.step("test", "Run renderer tests");
test_step.dependOn(&run_tests.step);
}