Expand description
Backend-independent build planning for Cabin.
This crate consumes a validated cabin_core::Package plus a
resolved C/C++ toolchain (from cabin-toolchain) and produces a
BuildGraph - a list of compile, archive, and link actions
plus the metadata needed to write a Clang-style compilation
database.
The graph is intentionally backend-agnostic. cabin-ninja knows how to
serialize it as build.ninja + compile_commands.json; future backends
(e.g. a Bazel exporter, or a direct in-process executor) could consume
the same structure.
Re-exports§
pub use check::into_check_graph;pub use error::BuildError;pub use error::FeatureGateFix;pub use graph::BuildGraph;pub use graph::CompileCommand;pub use graph::StandardViolation;pub use planner::ManifestTargetSelector;pub use planner::PlanRequest;pub use planner::plan;pub use planner::select_targets_of_kind;pub use planner::selector_required_features_met;pub use standard_compat::DeclScope;pub use standard_compat::DeclSite;pub use standard_compat::EdgeRequirement;pub use standard_compat::RequirementOrigin;pub use standard_compat::StandardCompatViolation;pub use validate::RequestedStandards;pub use validate::collect_requested_standards;pub use validate::msvc_external_includes_supported;pub use validate::requested_standards_of;pub use validate::validate_planned_standards;pub use validate::validate_toolchain_for_backend;pub use validate::validate_toolchain_standards;
Modules§
- check
- Transform a normal build graph into a syntax-check graph for
cabin check. Each workspace compile becomes an-fsyntax-onlycheck that produces a stamp instead of an object; archive, link, and dependency-package compiles are dropped. Pure and backend-independent: the transform flips each compile’sCompileModetoCompileMode::SyntaxOnlysemantically, and the dialect lowering (cabin-ninjaviacabin_driver::lower()) renders it through thec_check/cxx_checkrules. - clean
- Plan and execute the deletion list for
cabin clean. - error
- graph
- link_
diagnostics - Post-link-failure diagnostics.
- planner
- standard_
compat - Post-resolution language-standard compatibility checking.
- validate
- Validate that a detected toolchain can run the commands the C++ backend emits.
Structs§
- Archive
Action - Archive object files into a static library.
- Compile
Action - Compile one translation unit.
- Compile
Arguments - Semantic arguments for a compile, with no flag spelled out.
- Link
Action - Link objects and static archives into an executable.
Enums§
- Build
Action - A single semantic build step: compile a translation unit, archive objects into a static library, or link an executable.
- Compile
Mode - What a compile action should produce.
- Dialect
- A compiler command-line family. Selected from the detected C++ compiler and threaded through planning and Ninja generation so every artifact name and command line speaks one dialect.