~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zttp

mirror of https://tangled.org/zat.dev/zttp

0
0
main
35 lines · 1.5 KB Raw History
const std = @import("std");
pub fn build(b: *std.Build) void {
    const target = b.standardTargetOptions(.{});
    const optimize = b.standardOptimizeOption(.{});
    const imports: []const std.Build.Module.Import = &.{
        .{ .name = "zttp", .module = b.dependency("zttp", .{ .target = target, .optimize = optimize }).module("zttp") },
        .{ .name = "zio", .module = b.dependency("zio", .{ .target = target, .optimize = optimize }).module("zio") },
    };
    const contract = b.addTest(.{ .root_module = b.createModule(.{
        .root_source_file = b.path("contract.zig"),
        .target = target,
        .optimize = optimize,
        .link_libc = true,
        .imports = imports,
    }) });
    const run = b.addRunArtifact(contract);
    run.has_side_effects = true;
    b.step("test", "check deadline and cancellation contracts on Threaded and zio").dependOn(&run.step);
    const probe = b.addExecutable(.{ .name = "zttp-probe", .root_module = b.createModule(.{
        .root_source_file = b.path("probe.zig"),
        .target = target,
        .optimize = optimize,
        .link_libc = true,
        .imports = imports,
    }) });
    b.installArtifact(probe);
    const shutdown_probe = b.addExecutable(.{ .name = "zttp-shutdown-probe", .root_module = b.createModule(.{
        .root_source_file = b.path("shutdown_probe.zig"),
        .target = target,
        .optimize = optimize,
        .link_libc = true,
        .imports = imports,
    }) });
    b.installArtifact(shutdown_probe);
}