Skip to main content

run_data_systems

Function run_data_systems 

Source
pub fn run_data_systems(
    world: &mut World,
    runtime: &Runtime,
    deck: &mut OutputDeck,
    phase: TickPhase,
)
Expand description

Runs every [DataSystemRegistration] declared for the given phase, in a stable order: topological by runs_after, then by order_hint, then by name for full determinism.

deck is the per-tick typed [OutputDeck] the lanes wrote into during the CLAD descent. Maintenance-phase systems drain typed writeback slots from it (deck.take::<MyWriteback>()) and apply the results to ECS components. Pre-scheduler phases pass a transient empty deck.

On a cycle in runs_after the function logs an error and falls back to the (order_hint, name) ordering — execution still happens, just not in DAG order. Validating cycles at registration time is a future improvement.