henad_explore/lib.rs
1//! Parameter sweeps and searches over Henad models, and the folders of results they write.
2//!
3//! A sweep plans a spec against a model and runs every planned run. A search runs a spec's `[search]` table a batch of
4//! candidates at a time. On native, `sweep::run_spec` runs either and blocks until it ends, and `sweep::plan_spec`
5//! plans and probes one without running it. [`handle::SweepRun`] runs one beside a host's frame loop, on its own
6//! thread on native and pumped from the frames in a browser. [`spec_file`] reads and writes the TOML form of a spec.
7//!
8//! A sweep writes `manifest.json`, `runs.csv`, `series.csv` and `summary.csv` to a folder or to memory, and a search
9//! writes its own tables beside them. [`merge::merge`] joins the folders of a sweep's shards, and
10//! [`result_set::ResultSet`] reads a folder back. `benchmark` times a model's step loop, and `testing` holds the
11//! checks that a model's tests run against its entry.
12
13#![cfg_attr(docsrs, feature(doc_cfg))]
14#![warn(missing_docs)]
15// Proving a type that holds wgpu handles `Send` or `Sync` walks wgpu-core's registries, deeper than the default
16// limit of 128.
17#![recursion_limit = "256"]
18
19#[cfg(not(target_arch = "wasm32"))]
20pub mod benchmark;
21pub mod cursor;
22#[cfg(not(target_arch = "wasm32"))]
23pub mod device;
24pub mod exec;
25pub mod handle;
26pub mod merge;
27pub mod output;
28pub mod probe;
29pub mod progress;
30#[cfg(any(target_arch = "wasm32", test))]
31pub(crate) mod pumped;
32pub mod result_set;
33pub mod schema;
34pub mod search_run;
35pub mod spec_file;
36pub mod sweep;
37#[cfg(any(feature = "testing", test))]
38pub mod testing;
39
40#[cfg(test)]
41mod tests;
42
43use henad_core::provenance::BuildInfo;
44
45/// Henad's own build, stamped by henad-explore's build script over the engine's crates.
46///
47/// In Henad's checkout the source hash covers henad-core, henad-build, henad-compute and henad-explore with the
48/// workspace's lockfile. In a package it covers henad-explore alone.
49pub const ENGINE_BUILD: BuildInfo = henad_core::build_info!();
50
51/// Hash of henad-explore's own `src` and manifest as 16 hexadecimal digits, empty without a stamp.
52pub(crate) const CRATE_HASH: &str = match option_env!("HENAD_BUILD_CRATE_HASH") {
53 Some(hash) => hash,
54 None => "",
55};
56
57/// Version of the henad-build that stamped henad-explore, empty without a stamp.
58pub(crate) const STAMP_VERSION: &str = match option_env!("HENAD_BUILD_STAMP_VERSION") {
59 Some(version) => version,
60 None => "",
61};