Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/edda

.nornir/build-variants.md

nornir build variants — declarative build "goals" + a Build button

A product like holger ships several distinct binaries/profiles (embedd / mikro / full, plus optional wasm + feature toggles). Instead of remembering the cargo build -p … --bin … --features … incantations, each product declares its valid build variants as data; nornir validates a chosen variant, materializes it into a cargo build, and can present the options + a Build button. PLAN task #19. Lives in src/build/variant.rs ([build] in nornir.toml or .nornir/build-variants.toml).

Design

Worked example — holger's real products: holger-server (pkg holger-server-cli), holger-agent (pkg holger-agent-cli), holger-mannequin, plus the fat GUI holger-ui (required-features = ["gui"]). Encoded as offers = ["gui","served","testmatrix"], exclusive = [["gui","lean"]], required."holger-ui" = ["gui"].

Guide

nornir build --list-variants        # print each variant → its cargo command line
nornir build --variant server       # validate + materialize + run cargo build
nornir build --variant ui --dry-run # validate + print the argv, build nothing
nornir build --variant full --repo /path/to/holger

Add a variant = add a [[build.variant]] table (or a row to the set) — no code change. Invalid combinations are rejected up front with the reason.

Idiot guide