Expand description
Typed compiler-cache wrapper model.
Cabin can prefix the C++ compile driver with a compiler cache
wrapper such as ccache or sccache. The wrapper is a separate
concept from the compiler itself: it is layered on top, applies
only to compile commands (never link or archive), and is selected
through the same precedence ladder as the rest of the toolchain.
This module owns data only: the typed enums, the manifest
declaration types, the resolved value, and the JSON helpers that
cabin metadata consumes. PATH lookup, env reading, and
subprocess version probing live in cabin-toolchain. CLI flag
handling lives in cabin. Manifest parsing lives in
cabin-manifest.
Structs§
- Compiler
Wrapper Identity - Identity captured from a wrapper executable’s
--versionoutput. Populated bycabin-toolchain::detect_compiler_wrapperand surfaced through metadata. - Compiler
Wrapper Manifest Settings - Workspace-root manifest’s compiler-wrapper declarations.
- Compiler
Wrapper Summary - Lightweight, non-machine-specific summary of a resolved wrapper.
Carried inside
crate::ToolchainSummaryso the build configuration fingerprint reflects “which wrapper did this build use” without pinning the local absolute path. - Conditional
Compiler Wrapper Decl [target.'cfg(...)'.profile.cache]block. Same shape as the general[profile.cache]table but tagged with the predicate that gates it.- Resolved
Compiler Wrapper - Fully resolved compiler-cache wrapper, ready to prefix the C++ compile command.
Enums§
- Compiler
Wrapper Kind - Which compiler-cache wrapper Cabin should prefix the C++ compile
driver with. The “no wrapper” case is represented as the absence
of a
ResolvedCompilerWrapper(i.e. anOption::Noneat the call site), so this enum stays small and total over the wrappers Cabin actually understands. - Compiler
Wrapper Parse Error - Errors produced by
CompilerWrapperRequest::parse. - Compiler
Wrapper Request - What the user (or a manifest layer) asked for, structurally.
- Compiler
Wrapper Source - Where a resolved wrapper selection ultimately came from.
Recorded alongside the resolved wrapper so
cabin metadatacan show the precedence without re-deriving it.