rust-supervisor Manual
Language: δΈζ
Project Scope
rust-supervisor is a Rust task supervision core for Tokio services. It uses declarative models to manage child startup, stop, restart, quarantine, state query, event recording, health checks, and Shutdown Without Orphaned Tasks.
The configuration boundary uses rust-config-tree v0.1.9 with YAML files. Runtime tunable values must enter the system through this centralized configuration path.
This project has no legacy interface burden. Users should import public types from owning module paths, such as rust_supervisor::runtime::supervisor::Supervisor.
Reading Path
- Getting Started: start a minimal supervisor from YAML configuration.
- Configuration: understand
SupervisorConfig,ConfigState, and startup rejection boundaries. - Supervisor Tree: understand
SupervisorSpec,SupervisorTree, and registry ownership. - Task Model: understand
ChildSpec,TaskFactory,TaskContext, and readiness. - Policies: understand restart decisions, backoff, fuse rules, quarantine, and task exit classification.
- Runtime Control: understand
SupervisorHandlecommands and idempotent behavior. - Dashboard: understand the three-end workflow across the target process, relay, and dashboard client.
- Shutdown: understand four-stage shutdown and blocking worker boundaries.
- Observability: understand events, logs, tracing, metrics, audit data, and run summaries.
- Examples: run each learning example under
examples/. - Quality Gates: run formatting, build, test, documentation, SBOM, and release checks.
Runtime Boundary
The supervisor core governs lifecycle behavior only. High-frequency business messages belong in the data plane. The control plane handles lifecycle commands, current state queries, events, and governance decisions.