Eric Bower
·
2026-10-20
1//! libzmx - Public programmatic interface for zmx.
2const std = @import("std");
3const build_options = @import("build_options");
4const Allocator = std.mem.Allocator;
5const Io = std.Io;
6
7const client = @import("client.zig");
8const util = @import("util.zig");
9
10pub const has_daemon = if (@hasDecl(build_options, "has_daemon")) build_options.has_daemon else true;
11
12pub const ipc = @import("ipc.zig");
13
14pub const HistoryFormat = util.HistoryFormat;
15pub const SessionEntry = util.SessionEntry;
16
17pub const CreateOptions = client.CreateOptions;
18pub const AttachOptions = client.AttachOptions;
19pub const RunOptions = client.RunOptions;
20pub const KillOptions = client.KillOptions;
21pub const KillStatus = client.KillStatus;
22
23pub const connect = client.connect;
24pub const attach = client.attach;
25pub const detach = client.detach;
26pub const list = client.list;
27pub const kill = client.kill;
28pub const run = client.run;
29pub const wait = client.wait;
30pub const tail = client.tail;
31pub const send = client.send;
32pub const print = client.print;
33pub const write = client.write;
34pub const history = client.history;
35pub const historyRange = client.historyRange;
36pub const get = client.get;
37pub const set = client.set;
38pub const clear = client.clear;
39pub const printEnv = client.printEnv;
40
41// Export create() when daemon is enabled, or provide compile error
42pub const create = if (has_daemon) client.create else @compileError("create() requires -Ddaemon=true");