copper-project/copper-rs

feature: User friendly way to notify a lifecycle violation in the runtime

Aperta

#1091 aperta il 10 mag 2026

 (0 commenti) (0 reazioni) (0 assegnatari)Rust (97 fork)auto 404
enhancementerror_handlinggood first issuehelp wanted

Metriche repository

Star
 (1428 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Problem statement

Today we have several levels of APIs for the runtime that allows a full control from the user of the framework over the lifecycle of it.

The issue is that the user can put the stack in a bad state without noticing: for example calling start_all_tasks twice or mixing it with application.run

Proposed solution

Add a small enum based state machine to track the validity of those lifecycle changes and emit an error accordingly.

Alternatives considered (optional)

Make that debug only but this should be so small it might not worth it

Impact / scope (optional)

  • Affected crates, platforms, or features:

Additional context (optional)

Guida contributor