rust-tokio-supervisor
rust-tokio-supervisor is the crates.io package for the rust-supervisor project. It is a Rust task supervision core for Tokio services. It provides declarative supervisor trees, child lifecycle governance, restart policies, four-stage shutdown, current state queries, event journal storage, and observability signals.
Terminology: rust-config-tree v0.1.9 is the centralized configuration loader, and Shutdown Without Orphaned Tasks is the formal shutdown term.
Package name: rust-tokio-supervisor. Library crate name: rust_supervisor.
Capability Boundary
- Declare
ChildSpecandSupervisorSpec. - Start fresh futures through
TaskFactoryorservice_fn. - Use
OneForOne,OneForAll, andRestForOnesupervision strategies. - Produce
RestartDecisionvalues from typed failures, backoff, jitter, fuse rules, and the policy engine. - Control a running tree through
SupervisorHandleoperations such asadd_child,remove_child,restart_child,pause_child,resume_child,quarantine_child,shutdown_tree,current_state, andsubscribe_events. - Load the primary YAML configuration from
examples/config/supervisor.yaml. - Emit structured logs, tracing spans, metrics, audit events, event journal entries, and
RunSummarydiagnostics.
No Compatibility
No Compatibility: this crate is a new project with no legacy API aliases. Consumers should import public types from their owning module paths, for example rust_supervisor::runtime::supervisor::Supervisor.
Quick Start
The example follows this path:
use load_config_state;
use Supervisor;
async
Examples
Manuals
manual/en/index.md: English user manual.manual/zh/index.md: Chinese user manual.docs/en/index.md: English engineering documentation.docs/zh/index.md: Chinese engineering documentation.
Quality Gates
Engineering gate details are documented in docs/en/quality-gates.md and docs/zh/quality-gates.md. Parallel implementation governance is documented in docs/en/parallel-governance.md and docs/zh/parallel-governance.md.
License
This project is licensed under the MIT license. See LICENSE.