Skip to main content

Module toolchain

Module toolchain 

Source
Expand description

Typed C/C++ toolchain selection model.

Cabin builds C/C++ packages with three external tools — a C compiler, a C++ compiler, and a static-library archiver. The selection is explicit, deterministic, and auditable: every component owns a typed model in this module, and the resolver in cabin-toolchain produces one ResolvedToolchain per build.

This module owns data only. PATH lookup, env reading, and filesystem checks live in cabin-toolchain. Manifest parsing lives in cabin-manifest. CLI flag handling lives in cabin.

Structs§

ConditionalToolchainDecl
Conditional [target.'cfg(...)'.toolchain] block.
ResolvedTool
One concrete tool, ready to be invoked.
ResolvedToolchain
Fully-resolved C/C++ toolchain.
ToolSelection
CLI / orchestration-supplied request for one tool.
ToolchainDecl
Manifest-shape declaration for tool selection.
ToolchainSelection
Aggregate of ToolSelections, one per ToolKind.
ToolchainSettings
Workspace-root toolchain settings derived from the manifest. Holds both the unconditional [toolchain] table and any [target.'cfg(...)'.toolchain] overrides.

Enums§

ToolKind
Which kind of tool a selection refers to.
ToolSource
Where a tool selection ultimately came from. Recorded alongside the resolved tool so cabin metadata can show the precedence without re-deriving it.
ToolSpec
Either a bare command name (resolved against PATH) or an explicit filesystem path. The resolver turns either form into a concrete PathBuf when it builds a ResolvedTool.
ToolchainResolutionError
Errors produced while resolving a toolchain.