Expand description
Typed semantic build flags.
Cabin recognizes explicit, semantic build flags that compose across four layers, in this order (later layers override or append to earlier ones):
- Built-in backend defaults (today: the planner adds
-std=c11for C compiles and-std=c++17for C++ compiles). - Per-package general
[profile]flags from the manifest. - Per-package matching
[target.'cfg(...)'.profile]flags. - Workspace-root
[profile.<name>]flags for the selected profile.
Manifest-declared fields are intentionally explicit: defines, include directories, C-only compile arguments, C++-only compile arguments, and link arguments. The C/C++ argv spaces stay separate all the way to the planner.
Structs§
- Conditional
Profile Flags - Conditional
[target.'cfg(...)'.profile]block. Same shape asProfileFlagsbut tagged with the predicate that gates it. - Profile
Flags - Manifest-shape build-flag declaration. One per
[profile]/[target.'cfg(...)'.profile]/[profile.<name>]table. - Profile
Settings - Per-package build-flags settings. Holds the unconditional
[profile]table plus any[target.'cfg(...)'.profile]overrides declared in the same manifest. - Resolved
Profile Flags - Final, deterministic build-flag set fed to the planner.
Enums§
- Build
Flags Validation Error - Errors produced while validating a manifest-side build-flags declaration.
Functions§
- resolve_
build_ flags - Resolve build flags by merging the per-package and per-profile layers, in order.