Files
soleprint/rig/standalone/README.md

2.7 KiB

standalone — rig as single files, one folder per profile

Everything in the <profile>/ folders here is generated. Do not edit it. It is rig's own tools flattened into single self-contained files, with one profile's configuration resolved in, for a machine the full rig is not going to.

standalone/<profile>/rigdeps.sh    rig's toolchain installer   (ctrl/deps.sh)
standalone/<profile>/rigmini.sh    rig's memory tool           (ctrl/mem.sh)
standalone/<profile>/Makefile      shorthand for calling them

One folder per file in ctrl/env.d/. Pick the profile you mean to run and copy that folder; nothing else from rig is needed. The scripts run without the Makefile.

bash rigdeps.sh detect          # report the host and toolchain; changes nothing
bash rigdeps.sh install dev     # download, verify, install into ~/.local/bin
bash rigmini.sh status          # advertised memory and what caps it; safe
bash rigmini.sh all             # measure, then weigh it against this profile
make deps / make mem            # the same, via the Makefile

rigmini.sh push and all deliberately consume memory. Run status first, and only run them somewhere other processes may be squeezed.

Your own setup, somewhere else — export

The folders here are rig's profiles, identical on any machine. To take the setup this machine runs instead — its profile plus the choices in its local ctrl/.env (ports, manifest directory, mirror mode) — export it:

make standalone export ~/rig-kit       # one kit, outside the repository

An export carries your choices, never your credentials. Anything in ctrl/.env that is not a setting a caller may override — registry logins, a mirror URL — is left out, and the export lists those names so you know what to set on the target. It refuses to write inside the repository: it reflects one machine, and the repository holds what is true for every machine. make selftest proves both with sentinel values.

Why generated

These used to be hand-kept copies, and they drifted: the standalone memory tool said 2 GB per node long after rig had measured 800 MB. Now a kit is a pure function of rig. It gains nothing rig lacks; improve rig and every kit follows.

make standalone          # regenerate every kit
make standalone check    # fail if any kit differs from what rig generates now

make selftest runs the check, so a kit left behind by a change to rig fails there rather than on the machine it was copied to.

How the generator stays correct as rig changes shape — it knows no file, function or variable names, only a marker, a sourcing rule and two config questions, and it proves each kit stands alone before writing it — is in ctrl/standalone.sh.