Skip to main content

Crate henad_core

Crate henad_core 

Source
Expand description

Core traits and types for the Henad simulation engine.

  • authoring holds the five model traits, one per topology and backend, and the primitives their kernels call.
  • params, view and action hold the descriptors a model declares for its parameters, its stats and its one-off actions.
  • model holds SimState, the interface the runner drives.
  • explore plans sweeps and searches without an engine, and export writes a run’s results.
  • provenance identifies the build of each crate and the source of each model.

A program depends on the henad facade instead. It re-exports these items under one module tree. The authoring guide explains each trait.

Re-exports§

pub use authoring::model::field::Extent;

Modules§

action
One-off steps a model offers the user, run between ticks.
authoring
The model authoring API.
explore
Building blocks for parameter sweeps over a model.
export
Writers of a run’s stat series and final state, and a writer and reader of comma-separated values (CSV) fields.
grid
The double-buffered Grid2D that holds a grid model’s cells.
helpers
Builders for parameter descriptors and stat entries, parameter value readers, and fmt_bytes.
metadata
Model metadata the engine derives from a model’s declarations.
model
The SimState interface the runner drives.
network
A dynamic graph represented using CSR-like rows of neighbours, with an edge list.
params
Parameter descriptors, the values they describe, and the ParamStore a running state keeps the values in.
provenance
Identity of compiled crates and the source of each model.
send_sync
Send and Sync bounds that relax on wasm with atomics.
spatial_hash
The counting-sort SpatialHash that agents use to find their neighbours, and the HashGrid cell geometry both backends share.
topology
Display layers a model presents, and the neighbourhood a grid rule reads.
view
Views a state passes to the renderer, and the stat values and history the UI charts.

Macros§

actions
Declares a model’s actions and their indices in one place.
buffers
Declares a model’s storage buffers and their indices in one place.
build_info
Returns the BuildInfo of the crate the macro expands in.
params
Declares a model’s parameters and their indices in one place.