deck-based-open-source-visualisation-engine-for-reactors-dover 0.0.1

DOVER (Deck-based Open-source Visualisation Engine for Reactors) — low-fidelity reactor models driven by TOML input decks, headless. First case: steam methane reforming in a CSTR.
Documentation
//! Run a DOVER deck headless and print the CSV.
//!
//! ```text
//! cargo run --release -p deck-based-open-source-visualisation-engine-for-reactors-dover --example smr_cstr -- crates/dover/decks/smr_cstr.toml
//! ```
//!
//! With no argument it runs the bundled base deck. There is no GUI and no
//! window: DOVER is headless by construction, so this is simply how it runs.

fn main() {
    let path = std::env::args()
        .nth(1)
        .unwrap_or_else(|| "crates/dover/decks/smr_cstr.toml".to_string());

    let text = match std::fs::read_to_string(&path) {
        Ok(t) => t,
        Err(e) => {
            eprintln!("cannot read deck {path}: {e}");
            std::process::exit(2);
        }
    };

    match dover::headless::run_toml(&text) {
        Ok(csv) => print!("{csv}"),
        Err(e) => {
            eprintln!("{e}");
            std::process::exit(1);
        }
    }
}