//! Stand-alone build for the example, illustrating how a downstream project //! wires up `zig build bench` using the `zbench_build` helper. //! //! Note: when building the example from the zbench repo root via //! `zig build example`, this file is unused — the root `build.zig` wires //! it up directly. This file demonstrates the integration pattern for a //! consumer project that lists `zbench` as a dependency. const std = @import("std"); const zbench_build = @import("zbench_build"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const zbench = b.dependency("zbench", .{ .target = target, .optimize = .ReleaseFast, }); _ = zbench_build.add_bench_step(b, .{ .step_name = "bench", .root = b.path("main.zig"), .target = target, .zbench = zbench.module("zbench"), }); }