Gunnar

nordisk/edda

crates/edda-build-thing/Cargo.toml

# edda's **build thing** — the recipe, as a crate. CODE IS THE SOURCE.
#
# The 2026-08-27 law (dwarves/.nornir/build-thing-code-is-source-design.md): a
# build thing IS the Rust `impl BuildThing`, and `.nornir/build-variants.toml` is
# EMITTED from it — a description of the build, regenerated by
# `edda-build-thing emit`, never edited by hand and never read back as authority.
# edda was one of the last two of the sixteen with no emitter at all: its
# `.nornir/build-variants.toml` was HAND-WRITTEN, declaring two rows and no suite
# tag, and a hand-written declaration is one nothing can check. It had already
# gone wrong in exactly the way an unchecked declaration goes wrong — see the
# `korp-installer` / `korp-start` rows in src/recipe.rs, two shipped musl
# binaries the file excused as "NOT plain cargo artifacts" while
# `korp_installer::pid1build::build_pid1` built them with `cargo build --release
# --bin … --target x86_64-unknown-linux-musl`.
#
# ── THE NAME, AND WHY THERE IS NO COLLISION TO CARRY ─────────────────────────
#
# dwarves' forge looks for a package named `<repo>-build-thing` under `crates/`
# or the repo root and REFUSES anything else BY NAME
# (`dwarves::build_thing::code::recipe_crate`). This repo is `edda`, so the name
# is `edda-build-thing` — which is NOT the name of the evaluator that also lives
# here (`nornir-build-thing`, edda's own crate, the one every recipe in the
# constellation is written against). Two different spellings, so unlike the
# `nornir` repo — which had to take its dependency under cargo's `package =`
# rename and pay for it with `cargo run -p nornir-build-thing` answering
# "specification is ambiguous" from that root — nothing here needs a rename, and
# `cargo run -p edda-build-thing -- emit` resolves to exactly one package.
#
# The evaluator is a SIBLING WORKSPACE MEMBER rather than a foreign checkout, so
# the dependency is `path = "../nornir-build-thing"` with no `../../..` escape.
[package]
name = "edda-build-thing"
version = "0.1.0"
edition = "2021"
rust-version = "1.85"
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/edda"
description = "edda's build thing: the two shipped executables of the nordisk shared-lib samling (autonom, robotui) as typed Rust; .nornir/build-variants.toml is emitted from it."
# Path-deps the evaluator in this same workspace, which is edited in the same
# afternoon as the recipes that read it, so this crate is not published.
publish = false

[lib]
# `cdylib` is the wasm32 module the forge loads (a recipe crate that is not a
# cdylib is REFUSED BY NAME by dwarves `build_thing::code`); `rlib` is the native
# library the tests and the emit bin link. One source, no `cfg` fork.
crate-type = ["cdylib", "rlib"]

[[bin]]
# The emit door: `edda-build-thing emit` regenerates .nornir/build-variants.toml
# from `variants()`; `--list` prints the roster; `toml` prints the emission.
name = "edda-build-thing"
path = "src/main.rs"

[dependencies]
# The contract, the declaration types, the `plugin::BuildThing` trait and the ONE
# `code -> toml` emitter (`nornir_build_thing::emit`).
# `default-features = false`: a declaration computes nothing heavy.
nornir-build-thing = { path = "../nornir-build-thing", version = "0.2.0", default-features = false }
anyhow = "1"

[dev-dependencies]
nornir-build-thing = { path = "../nornir-build-thing", version = "0.2.0", default-features = false }

[build-dependencies]
# The recipe's own content hash over its sources (`build.rs`): a receipt names
# the recipe by `krate:version:hash`.
sha2 = "0.11"