1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
}