crates/knut-build-thing/src/lib.rs
//! **knut's build thing** — the recipe as code (the source), from which
//! `.nornir/build-variants.toml` is EMITTED (a description).
//!
//! * [`recipe`] — [`KnutBuild`], the `impl BuildThing`: the six rows knut ships,
//! the feature space, the typed consequence of a toggle, and the two rules only
//! knut knows.
//! * [`emit`] — this repo's header, and the three calls into the one emitter
//! (`nornir_build_thing::emit`).
//!
//! # 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.
//!
//! knut was the constellation's clearest counter-example until 2026-09-20. The
//! old `knut-build` did `include_str!("../build-variants.toml")` and then
//! `BuildVariantSet::from_toml_str` — so the hand-written file was not a
//! description of the build, it WAS the build thing, and the Rust around it was a
//! reader with opinions. Everything a reader cannot check lived there: six rows
//! with no `suites` tag (untagged is not a third flavour — it is a row
//! `--suite ORIGINAL` cannot select), eleven real features missing from `offers`,
//! a fifth `required-features` binary nobody had noticed, an excluded wasm
//! package no `-p` could reach, and no toolchain pin at all.
//!
//! There is one declaration now, the file is its projection, and the emitter
//! refuses bytes that do not read back EQUAL through the one loader.
pub mod emit;
pub mod recipe;
pub use emit::{emitted_toml, write_emitted, EMITTED_HEADER};
pub use recipe::{
consequence_of, feature_table, judge_against, starts_a_database, validate_against, KnutBuild,
AUTOSTARTS_A_DATABASE, CONTENT_HASH, FALKORDB_AUTOSTART_TOKEN, KRATE, REQUIRED_FEATURES, SUITE,
};
nornir_build_thing::export_build_thing!(KnutBuild);
pub use nornir_build_thing::contract::{Coordinate, PaneKind, Receipt, RECEIPT_SECTION};
pub use nornir_build_thing::plugin::BuildThing;
pub use nornir_build_thing::variant::BuildVariantSet;