running-process 4.0.2

Subprocess and PTY runtime for the running-process project
Documentation
[package]
name = "running-process"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Subprocess and PTY runtime for the running-process project"

[[bin]]
# Wave 4 of #165: PM2-style supervisor CLI absorbed from
# `running-process-client`. Requires the `client` feature for IPC deps.
name = "runpm"
path = "src/bin/runpm.rs"
required-features = ["client"]

[[bin]]
# Wave 5 of #165: daemon binary absorbed from `running-process-daemon`.
# Requires the heavy `daemon` feature (tokio, sqlite, etc.).
name = "running-process-daemon"
path = "src/bin/daemon.rs"
required-features = ["daemon"]

[[bin]]
# Wave 6 of #165: tiny launcher binary absorbed from the
# `daemon-trampoline` crate. Reads a sidecar JSON file and execs the
# target command. No required-features — uses only serde/serde_json
# (promoted to unconditional deps below) plus libc + winapi which
# the lib already pulls in.
name = "daemon-trampoline"
path = "src/bin/trampoline.rs"

[features]
# Final feature scheme per #165:
# * `core`   — always-available API (spawn / pty / containment).
# * `client` — adds proto types + IPC client (prost, interprocess, dirs).
# * `telemetry` — tee sink primitives without the full daemon runtime.
# * `daemon`    — superset of client; adds the full daemon runtime
#                 (tokio, rusqlite, tracing, etc.).
# Default ships `client` so `cargo install running-process` installs
# the `runpm` binary out of the box (per Q1 resolution in #165:
# `required-features` are not auto-activated by cargo install).
default = ["client"]
core = []
telemetry = []
client = ["dep:prost", "dep:prost-types", "dep:interprocess", "dep:dirs", "dep:anyhow", "dep:clap"]
daemon = [
    "client",
    "interprocess/tokio",
    "dep:tokio", "dep:tokio-util", "dep:bytes", "dep:futures-util",
    "dep:tracing", "dep:tracing-subscriber",
    "dep:rusqlite", "dep:toml",
]
originator-scan = []               # used by running-process-py for cwd-tagging

[dependencies]
libc = "0.2"
portable-pty = "0.9"
sysinfo = "0.30"
thiserror = { workspace = true }
winapi = { version = "0.3", features = ["errhandlingapi", "fileapi", "handleapi", "ioapiset", "jobapi2", "namedpipeapi", "processthreadsapi", "winnt", "minwindef", "windef", "winuser", "consoleapi", "processenv", "synchapi", "winbase", "wincon", "tlhelp32"] }
# Wave 4 of #165: client-feature deps. All optional so the always-on
# `core` API stays a minimal-dep leaf.
prost = { version = "0.14", optional = true }
prost-types = { version = "0.14", optional = true }
interprocess = { version = "2", optional = true }
dirs = { version = "6", optional = true }
# Used by the `runpm` PM2-style supervisor CLI (src/bin/runpm.rs).
anyhow = { version = "1", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
# Wave 5 of #165: daemon-feature deps. All optional.
tokio = { version = "1", features = ["full"], optional = true }
tokio-util = { version = "0.7", features = ["codec"], optional = true }
bytes = { version = "1", optional = true }
futures-util = { version = "0.3", features = ["sink"], optional = true }
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
rusqlite = { workspace = true, optional = true }
toml = { version = "0.8", optional = true }
# Wave 6 of #165: serde / serde_json promoted from daemon-feature
# optional to unconditional so the `daemon-trampoline` binary (which
# does not need the full daemon runtime) can deserialize its sidecar
# JSON without forcing `--features daemon`. They were already pulled
# in transitively under the daemon path; this just makes them always
# present.
serde = { version = "1", features = ["derive"] }
serde_json = "1"

[build-dependencies]
# Wave 3 of #165: build.rs absorbed from `running-process-proto`.
# Compiles proto/daemon.proto into OUT_DIR.
prost-build = "0.14"
protox = "0.9"

[dev-dependencies]
serde_json = "1"
tempfile = "3"
test-watchdog = { path = "../test-watchdog" }

# #150: ConPTY passthrough rewrite uses windows-sys directly for the
# new conpty_passthrough module. Kept alongside (not replacing) the
# existing winapi 0.3 dep because the rest of the crate's Windows
# call sites are on winapi and migrating them is out of scope.
# windows-sys 0.59 exposes CreatePseudoConsole / ResizePseudoConsole /
# ClosePseudoConsole + PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE directly.
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = [
    "Win32_Foundation",
    "Win32_Security",
    "Win32_Storage_FileSystem",
    "Win32_System_Console",
    "Win32_System_IO",
    "Win32_System_Memory",
    "Win32_System_Pipes",
    "Win32_System_Threading",
    "Win32_System_Diagnostics_Debug",
] }

# Wave 5 of #165: extra dev-deps absorbed from `running-process-daemon`
# for its windows-only and unix-only integration tests.
[target.'cfg(windows)'.dev-dependencies]
winapi = { version = "0.3", features = ["handleapi", "processthreadsapi", "winnt"] }