henad_core/lib.rs
1//! Core traits and types for the Henad simulation engine.
2//!
3//! - [`authoring`] holds the five model traits, one per topology and backend, and the primitives their
4//! kernels call.
5//! - [`params`](mod@params), [`view`] and [`action`] hold the descriptors a model declares for its
6//! parameters, its stats and its one-off actions.
7//! - [`model`] holds [`SimState`](model::SimState), the interface the runner drives.
8//! - [`explore`] plans sweeps and searches without an engine, and [`export`] writes a run's results.
9//! - [`provenance`] identifies the build of each crate and the source of each model.
10//!
11//! A program depends on the `henad` facade instead. It re-exports these items under one module tree.
12//! The [authoring guide](https://micfong-z.github.io/henad/authoring/) explains each trait.
13
14#![cfg_attr(docsrs, feature(doc_cfg))]
15#![warn(missing_docs)]
16
17pub mod action;
18pub mod authoring;
19pub mod explore;
20pub mod export;
21pub mod grid;
22pub mod helpers;
23pub mod metadata;
24pub mod model;
25pub mod network;
26pub mod params;
27pub mod provenance;
28pub mod send_sync;
29pub mod spatial_hash;
30pub mod topology;
31pub mod view;
32
33/// World size.
34pub use authoring::model::field::Extent;
35
36/// Version of henad-core. The crate has no build script to stamp a [`provenance::BuildInfo`].
37#[doc(hidden)]
38pub const __VERSION: &str = env!("CARGO_PKG_VERSION");
39
40/// Items that the exported macros reference through `$crate`, so a caller needs none of them in scope.
41#[doc(hidden)]
42pub mod __macro_support {
43 pub use crate::action::ActionDescriptor;
44 pub use crate::authoring::model::gpu_agent_model::BufferSpec;
45 pub use crate::params::ParamDescriptor;
46 pub use crate::provenance::BuildInfo;
47}