Expand description
Engine machinery that turns an authoring impl into something runnable.
cpu and gpu each hold one backend’s engines, runner and primitives. An engine state, such as
GridModelState or GpuAgentState, runs one authoring trait as a
SimState. Both backends share snapshot, runtime_info,
display_scale and fault, and runner drives either backend’s loop.
entry type-erases a model behind one entry a host can list and build, and simulation builds one with
checked values and steps it from a program.
Modules§
- cpu
- CPU engine machinery, the sibling of
crate::gpu. - display_
scale - Scaling for display textures.
- entry
- Model entries, the type-erased form in which a host offers a model, and the sets that hold them.
- fault
- Faults caught while building or stepping a model.
- gpu
- GPU engine machinery, the sibling of
crate::cpu, for models whose state lives in GPU buffers and never round-trips to the CPU. - runner
- Drivers of a sim loop, and the one place the native and browser ways of driving one differ.
- runtime_
info - Host and adapter facts, gathered once at startup for a host to show and a sweep to record.
- simulation
- Checked setups for one build of a model, and the simulations they build.
- snapshot
- Snapshots a runner publishes for a host to draw: the tick, the stats and the model’s view layers.
Macros§
- agent_
lanes - Declares a model’s agent lanes.
- for_
each_ chunk_ mut - Runs a body over each chunk of a mutable slice, in parallel.
- include_
shaders - Brings in the Rust that henad-build generated from the crate’s WGSL, as the modules
shader_bindingsandbinding_decls.