Expand description
The app of Henad, a parallel agent-based modelling engine, as a library.
run_native opens a window over the models an AppOptions holds, and start_web starts the same app in a
browser. The official henad-app binary calls them with the example models. A project that defines its own models
opens the same app over its ModelSet.
use henad_app::AppOptions;
use henad_compute::entry::ModelSet;
fn main() -> Result<(), henad_app::AppError> {
let models = ModelSet::new(henad_core::build_info!());
let options = AppOptions::new(models, "My Models", henad_core::build_info!()).cli_command("my-models-cli");
henad_app::run_native(options)
}An AppOpening opens the app on a results folder, a recorded run or a setup the host built, instead of the
first model of the set.
Structs§
- AppError
Non-WebAssembly - Reason the native app did not start, or ended with an error.
- AppOptions
- Model set, product details and opening a host starts the app with.
Enums§
- AppOpening
- Results folder, run or setup the app opens on, beside its model list.
- OpenAt
- Tick an opened run or setup is stepped to.
Functions§
- results_
folder Non-WebAssembly - Returns the folder that
--open DIRor--open=DIRspecifies amongarguments, the command line without the program. - run_
native Non-WebAssembly - Opens the app window and returns when it closes.