pub struct EngineContext<'a> {
pub world: WorldAccess<'a>,
pub runtime: Arc<Runtime>,
pub bus: &'a LaneBus,
pub deck: &'a mut OutputDeck,
}Expand description
Engine context providing access to various subsystems.
Built once per frame by the Scheduler and passed to every Agent’s
execute(). The Agent forwards bus and deck to its LaneContext
so that lanes can read Flow outputs and write their own outputs.
The runtime bundle exposes the three runtime containers
(Services,
Backends,
Resources) — agents pick the right one
based on what they’re looking for.
Fields§
§world: WorldAccess<'a>The ECS World access this agent was granted — see WorldAccess.
Reach it through world_ref (read) or
world_mut (mutate), never by matching directly.
runtime: Arc<Runtime>Runtime containers — services (business APIs), backends (trait impls), resources (shared state).
bus: &'a LaneBusRead-only typed bus of Flow
outputs produced this tick. Lanes consume Views from here.
deck: &'a mut OutputDeckMutable typed deck for lane outputs (recorded GPU commands, draw lists, etc.). Drained by the engine at the I/O boundary.