crates/nornir-build-thing/src/lib.rs
//! **nornir's build thing** — the recipe as code (the source), from which
//! `.nornir/build-variants.toml` is EMITTED (a description).
//!
//! * [`recipe`] — `NornirBuildThing`, the `impl BuildThing`: what this repo
//! actually builds.
//! * [`emit`] — this repo's header, and the three calls into the one emitter.
//!
//! # The law this crate exists for
//!
//! dwarves `.nornir/build-thing-code-is-source-design.md` (2026-08-27): the CODE
//! is the source and the toml is emitted from it, one-directional, never read
//! back as authority. nornir was the LAST of the sixteen build-things with no
//! code recipe at all — a 495-line hand-written toml, which is a declaration
//! nothing can check. The two ways that goes wrong were both measured on
//! gunnar's file in one day: groups present in the toml and absent from the
//! code, with a parity test green over the loss; and the same file refused
//! outright by an older reader over one additive key. Neither is possible here:
//! there is one declaration, the file is its projection, and the emitter refuses
//! bytes that do not read back EQUAL through the one loader.
//!
//! # The dependency is aliased, and the alias is the point
//!
//! The evaluator in edda is ALSO named `nornir-build-thing`. The forge demands
//! this crate carry that name (`<repo>-build-thing`, refused by name otherwise),
//! so the collision is carried here under cargo's `package =` rename: `nbt`.
//! See this crate's `Cargo.toml` for why neither side is renamed instead.
pub mod emit;
pub mod recipe;
pub use emit::{emitted_toml, write_emitted, EMITTED_HEADER};
pub use recipe::{NornirBuildThing, CONTENT_HASH, KRATE};
nbt::export_build_thing!(NornirBuildThing);
pub use nbt::contract::{Coordinate, PaneKind, Receipt, RECEIPT_SECTION};
pub use nbt::plugin::BuildThing;
pub use nbt::variant::BuildVariantSet;