Axis / Build System / Builder

Builder

A Builder supplies reusable behavior for a source convention. It owns detection, default handlers and the names of required tool contracts. It does not own an execution filesystem or a scheduling policy.

Source and concrete API: builder.go.

Properties

Behavior

New accepts only a declaration of kind builder. Select evaluates candidates through the restricted callback and requires exactly one positive boolean result. No priority heuristic resolves ambiguity. Detection depends only on supplied source and machine facts.

The decision cache includes source identity, stripping policy, input context and candidate code and fields. It stores the choice, not an extracted source tree. Changed detectors invalidate the decision even when source bytes are unchanged.

Builder.Handler uses an explicit override before the corresponding default. An override replaces the default entirely; explicit delegation is allowed but automatic callback chaining is not.

Shipped conventions

The supplied Make, Linux, Zig and Go handlers live beside this specification. Each convention owns its accepted options, command translation, tool roles, output names and default installation mapping. Detecting a source marker is not proof that arbitrary upstream code honors the convention.

Make forwards declared compiler, archive and staging settings and job allocation. It cannot silently repair upstream code that ignores these settings or executes incompatible binaries.

Linux accepts CONFIG_ keys with string, boolean or integer values. Booleans normalize to y and n. Equal assignments agree; competing assignments fail with both origins. The handler runs the selected source’s Kconfig machinery and checks every explicit request against the effective generated configuration before success. It exports named files kernel (the arm64 Image) and config (the effective .config), and has no default installation contribution.

The implemented Linux profile uses native Linux/aarch64 execution and rejects other machine combinations. It requires the c contract bound to a compiler usable for both freestanding kernel code and native build helpers; the shipped source declaration selects bootstrap("kernel-c"). This is independent of the userspace compiler binding. Make, binutils, flex, bison, bc and the ELF/OpenSSL development headers must be present in the prepared filesystem.

The handler sorts a requested configuration fragment, runs allnoconfig with KCONFIG_ALLCONFIG, checks the generated assignments, builds Image, and checks the final assignments again. All required enabling options must be contributed explicitly; no implicit defconfig is substituted. String quoting preserves backslashes and quotes; newline and NUL values and fractional numbers fail. A missing symbol or a discarded request fails before publishing outputs. Native helpers and kernel compilation use explicit compiler arguments. Compilation timestamp, user, host and version are fixed; Make receives the allocated job count. Compilation work is private, while successful outputs use the ordinary verified phase cache.

Zig requires standard destination and optimization options and the requested installed executable. Its local and global compiler caches are persistent caller-supplied writable storage. Source changes leave cache validation to Zig; cache contents are not declared results.

Deterministic discovery callbacks, Cargo, CMake and Meson conventions are not implemented by the shipped selection profile. An explicit future convention must define its behavior before it is advertised.

Go construction adapter

The shipped go declaration builds a standalone, standard-library-only Go command from main.go with modules and cgo disabled. It emits a static Linux/arm64 executable, uses the declared tool-job budget and keeps compiler caches in the supplied cache directory. Module dependency acquisition is not implemented by this adapter.