Skip to main content

Module compiler_wrapper

Module compiler_wrapper 

Source
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§

CompilerWrapperIdentity
Identity captured from a wrapper executable’s --version output. Populated by cabin-toolchain::detect_compiler_wrapper and surfaced through metadata.
CompilerWrapperManifestSettings
Workspace-root manifest’s compiler-wrapper declarations.
CompilerWrapperSummary
Lightweight, non-machine-specific summary of a resolved wrapper. Carried inside crate::ToolchainSummary so the build configuration fingerprint reflects “which wrapper did this build use” without pinning the local absolute path.
ConditionalCompilerWrapperDecl
[target.'cfg(...)'.profile.cache] block. Same shape as the general [profile.cache] table but tagged with the predicate that gates it.
ResolvedCompilerWrapper
Fully resolved compiler-cache wrapper, ready to prefix the C++ compile command.

Enums§

CompilerWrapperKind
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. an Option::None at the call site), so this enum stays small and total over the wrappers Cabin actually understands.
CompilerWrapperParseError
Errors produced by CompilerWrapperRequest::parse.
CompilerWrapperRequest
What the user (or a manifest layer) asked for, structurally.
CompilerWrapperSource
Where a resolved wrapper selection ultimately came from. Recorded alongside the resolved wrapper so cabin metadata can show the precedence without re-deriving it.