ztmux_core/lib.rs
1//! ztmux-core — a native tmux client engine.
2//!
3//! Speaks tmux's client/server wire protocol (OpenBSD imsg framing, protocol
4//! version 8) directly to the server socket — no `tmux` subprocess, no control
5//! mode. Ported from tmux 3.6 sources.
6//!
7//! Layers:
8//! * [`transport`] — the wire client: [`command`], [`socket_path`], [`TmuxOutput`].
9//! * [`proc`] — read a pane's running command line (libproc / `/proc`).
10//! * [`ops`] — session tree, search corpus, broadcast list + `send_keys`,
11//! synchronize-panes, focus, dashboard summary — all returning `serde_json::Value`.
12//! * [`snapshot`] — native session save/restore (a tmux-resurrect replacement),
13//! parameterized by the storage directory so any app picks its own.
14//!
15//! Intended to be wired into GUI apps: each calls these functions and renders the
16//! JSON in its own frontend.
17
18pub mod ops;
19pub mod proc;
20pub mod transport;
21
22#[cfg(unix)]
23pub mod snapshot;
24
25pub use transport::{command, socket_path, TmuxOutput};