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

nordisk/dwarves

.nornir/holger-build-thing-for-idiots.md

holger build target — for idiots (zero-knowledge walkthrough)

Class: guide (beginner) · sibling: design · guide.

The one-sentence version

holger ships as three different programs built from the same code, and dwarves (the build robot) has a recipe that builds all three at once.

Why three programs?

holger is an artifact registry. It runs in very different places, so it comes in three sizes:

Same source, three "recipes" (Cargo features), three named executables.

Who does what?

Think of two people:

The foreman never picks up the hammer himself — that would be duplicating the builder's job (against the reuse law). He just points at holger's own list of the three sizes and says "build each of these."

Where is holger's list?

holger writes down its three sizes in a file: holger/.nornir/build-variants.toml. dwarves reads that file. It does not invent the list — it trusts holger's.

The safe check (no waiting for a build)

Building three programs is slow. So dwarves has a fast check that just makes sure the recipe still lines up with holger's list — without building anything:

$ dwarves holger-build ../holger
... 3 tier(s), 3 resolved, 0 missing ...
  ✓ embedded → bin holger-embedded ...
  ✓ mini     → bin holger-mikro ...
  ✓ full     → bin holger-full ...

"3 resolved, 0 missing" means the recipe still points at real programs. If holger ever renamed or removed a size, you'd see ✗ ... UNWIRED and the check would fail (exit 1) — so nobody can quietly break the build recipe.

Same check, but on a server far away (--server)

You can run the exact same check against a forge server running somewhere else — just add --server <address>:

$ dwarves --server 127.0.0.1:7900 holger-build /srv/holger
... 3 tier(s), 3 resolved, 0 missing ...

It phones the server (over gRPC, with your token), the server does the resolving on its own copy of holger, and you get the same printout and the same exit code. Handy when the holger checkout lives on the build machine, not your laptop.

The real build (when you want the actual programs)

Add --real (or run it on the forge server): now the builder wakes up and runs the three cargo builds for real, producing holger-embedded, holger-mikro, and holger-full. That part is slow and is skipped in the quick check on purpose.

Remember