//! The "client" library domain (library/client): userspace-service clients —
//! they talk to services over IPC, not to the kernel. Client modules end in
//! `-client` the way wire protocols end in `-protocol`, so a service, its
//! protocol, and its client never share a name (`display` the service,
//! `display-protocol` the wire contract, `display-client` a program's view).

const std = @import("std");

pub fn build(b: *std.Build) void {
    const kernel = b.dependency("kernel", .{});
    const protocol = b.dependency("protocol", .{});

    const ipc = kernel.module("ipc");
    const time = kernel.module("time");

    _ = b.addModule("display-client", .{
        .root_source_file = b.path("display/display-client.zig"),
        .imports = &.{
            .{ .name = "ipc", .module = ipc },
            .{ .name = "time", .module = time },
            .{ .name = "display-protocol", .module = protocol.module("display-protocol") },
        },
    });
    _ = b.addModule("input-client", .{
        .root_source_file = b.path("input/input-client.zig"),
        .imports = &.{
            .{ .name = "ipc", .module = ipc },
            .{ .name = "time", .module = time },
            .{ .name = "input-protocol", .module = protocol.module("input-protocol") },
        },
    });

    // Standalone `zig build test`, kept for uniformity across the domains (the
    // root aggregate depends on every domain's test step). The clients have no
    // host-runnable unit tests yet — they are thin IPC conversation wrappers —
    // so the step is empty until one grows some.
    _ = b.step("test", "Run the client unit tests (none yet)");
}
