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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[]
= "processkit"
= "0.5.1"
= "2024"
= "Child-process management: kill-on-drop process trees and async run-and-capture"
= "MIT"
= "https://github.com/ZelAnton/ProcessKit-rs"
= "README.md"
= ["process", "subprocess", "job-object", "cgroup", "tokio"]
= ["os", "asynchronous", "command-line-utilities"]
# Keep the published crate lean: ship code, docs, and license — not the
# dev/CI/agent tooling that only matters in the repo.
= [
".claude/",
".github/",
".editorconfig",
".gitattributes",
"AGENTS.md",
"CLAUDE.md",
"cliff.toml",
"deny.toml",
"rust-toolchain.toml",
]
# Minimum Supported Rust Version. 1.88 is required for `let`-chains
# (`if let … && let …`), used in the unix process-group/cgroup code. The `msrv`
# CI job verifies it — keep the two in sync; raise both when adopting a newer feature.
= "1.88"
# Build docs.rs with every feature so the `mock` MockRunner and the `tracing`
# integration are documented (default features alone hide them).
[]
= true
# ---------------------------------------------------------------------------
# Dependencies — every entry carries a "why" (see AGENTS.md "Dependency
# management"). Pin major versions, enable only the features used, keep
# Cargo.lock committed.
# ---------------------------------------------------------------------------
[]
# Async runtime + child-process management: `process` spawns children,
# `time` enforces timeouts, `io-util` streams stdin/stdout line-by-line,
# `rt` powers the background stderr-drain task, `macros` for `#[tokio::main]`
# in examples, `sync` for the oneshot/Notify used in shutdown coordination.
= { = "1", = ["process", "time", "io-util", "rt", "macros", "sync", "fs"] }
# `async fn` in the object-safe `ProcessRunner` trait so it stays `dyn`-able
# and mockable (native async-in-trait isn't object-safe on our MSRV).
= "0.1"
# Structured `Error` carrying program / exit code / stderr / timeout instead
# of stringly-typed failures; `#[non_exhaustive]` so variants can grow.
= "2"
# Decode child stdout/stderr in non-UTF-8 legacy encodings (Shift-JIS,
# Windows-1252, GBK, …) for the per-stream encoding-override option; default
# stays UTF-8.
= "0.8"
# Adapt tokio's `Lines` reader into an `impl Stream` for the streaming-output
# helper, so callers consume stdout with the standard `Stream` combinators.
# `io-util` gates the `wrappers::LinesStream` adapter we use.
= { = "0.1", = ["io-util"] }
# Optional per-run observability (program/args/exit/duration). Off by default;
# zero cost unless the `tracing` feature is enabled.
= { = "0.1", = true }
# Optional auto-generated `MockRunner` for downstream tests. Test-only; pulled
# in solely behind the `mock` feature, never in production builds.
= { = "0.13", = true }
[]
# Expose the `mockall`-generated `MockRunner` for consumers' tests.
= ["dep:mockall"]
# Emit a `tracing` event per command run (program, args, exit code, duration).
= ["dep:tracing"]
[]
# Win32 Job Object FFI for kill-on-close process trees: CreateJobObjectW /
# SetInformationJobObject / AssignProcessToJobObject / TerminateJobObject plus
# the HANDLE type & CloseHandle.
= { = "0.59", = [
"Win32_Foundation",
"Win32_System_JobObjects",
# JOBOBJECT_EXTENDED_LIMIT_INFORMATION + GetProcessTimes (per-process CPU);
# also CREATE_SUSPENDED / OpenThread / ResumeThread for race-free containment
# (spawn suspended → assign to job → resume the primary thread).
"Win32_System_Threading",
# CreateJobObjectW's signature references SECURITY_ATTRIBUTES.
"Win32_Security",
# K32GetProcessMemoryInfo (per-process peak working set) for diagnostics.
"Win32_System_ProcessStatus",
# Thread snapshot (CreateToolhelp32Snapshot / Thread32First/Next) to find a
# suspended child's primary thread for ResumeThread — std/tokio expose only
# the process handle, not the PROCESS_INFORMATION thread handle.
"Win32_System_Diagnostics_ToolHelp",
] }
[]
# Raw syscalls std can't express: the POSIX process-group backend (setpgid /
# killpg / kill for teardown and liveness probes) on every unix, plus — on Linux
# — joining cgroup.procs in pre_exec (async-signal-safe getpid/open/write/close).
= "0.2"
[]
# `#[tokio::test]` plus a multi-threaded runtime to drive the async tests.
= { = "1", = ["macros", "rt-multi-thread", "time", "io-util"] }
[]
# Liveness probe (OpenProcess) in the integration test that proves a grandchild
# is reaped with its job — integration tests can't see the non-dev windows-sys.
= { = "0.59", = ["Win32_Foundation", "Win32_System_Threading"] }