cabinpkg-core 0.14.0

Stable internal data model for Cabin
Documentation
//! Stable internal data model for Cabin.
//!
//! This crate defines the validated, format-agnostic types that the rest of
//! the workspace builds on. Manifest parsing, the CLI, and (later) the build
//! graph all consume the same `Package` value, so changes here ripple
//! everywhere — keep this surface small.
//!
//! Crate boundaries:
//! - this crate must not depend on `clap`, `toml`, or any raw manifest
//!   Structs;
//! - manifest-shaped serde structs live in `cabin-manifest`;
//! - CLI dispatch lives in `cabin`.

#![allow(clippy::return_self_not_must_use)]

pub mod build_flags;
pub mod build_jobs;
pub mod compiler;
pub mod compiler_wrapper;
pub mod condition;
pub mod config;
pub mod config_source;
pub mod error;
pub mod hash;
pub mod model;
pub mod patch;
pub mod profile;
pub mod registry;
pub mod source_language;
pub mod source_replacement;
pub mod term_color;
pub mod term_verbosity;
pub mod toolchain;
pub mod version_req;

pub use build_flags::{
    BuildFlagsValidationError, ConditionalProfileFlags, ProfileFlags, ProfileSettings,
    ResolvedProfileFlags, resolve_build_flags,
};
pub use build_jobs::{BuildJobs, BuildJobsParseError};
pub use compiler::{
    ArchiverCapabilities, ArchiverIdentity, ArchiverKind, Capability, CapabilitySource,
    CompilerCapabilities, CompilerIdentity, CompilerKind, CompilerVersion, ToolDetection,
    ToolDetectionError, ToolchainDetectionReport, derive_ar_capabilities, derive_cxx_capabilities,
    parse_ar_version_output, parse_cxx_version_output, validate_ar_for_backend,
    validate_cc_for_backend, validate_cxx_for_backend,
};
pub use compiler_wrapper::{
    CompilerWrapperIdentity, CompilerWrapperKind, CompilerWrapperManifestSettings,
    CompilerWrapperParseError, CompilerWrapperRequest, CompilerWrapperSource,
    CompilerWrapperSummary, ConditionalCompilerWrapperDecl, ResolvedCompilerWrapper,
};
pub use condition::{Condition, ConditionKey, ConditionParseError, TargetPlatform};
pub use config::{
    BuildConfiguration, BuildConfigurationInput, DEFAULT_FEATURE_KEY, FeatureEntry, Features,
    InvalidFeatureEntryKind, SelectionRequest, ToolchainSummary,
};
pub use config_source::ConfigValueSource;
pub use error::ValidationError;
pub use model::{
    Dependency, DependencyKind, DependencySource, Package, PackageConfigInput, PackageName,
    PortDepSource, SystemDependency, Target, TargetKind, TargetName, is_path_safe_package_name,
};
pub use patch::{
    DeclaredPatch, PatchManifestSettings, PatchProvenance, PatchSource, PatchSourceKind,
    PatchValidationError,
};
pub use profile::{
    BuiltinProfile, InvalidProfileName, OptLevel, ProfileDefaults, ProfileDefinition, ProfileName,
    ProfileResolutionError, ProfileSelection, ProfileSource, ResolvedProfile,
    available_profile_names, resolve_profile,
};
pub use source_language::{SourceLanguage, classify_source, link_driver_language};
pub use source_replacement::{
    SourceLocator, SourceReplacementEntry, SourceReplacementError, SourceReplacementResolution,
    SourceReplacementSettings,
};
pub use term_color::{ColorChoice, ColorEnvError, InvalidColorChoice};
pub use term_verbosity::{InvalidVerbosityCombination, Verbosity, VerbosityEnvError};
pub use toolchain::{
    ConditionalToolchainDecl, ResolvedTool, ResolvedToolchain, ToolKind, ToolSelection, ToolSource,
    ToolSpec, ToolchainDecl, ToolchainResolutionError, ToolchainSelection, ToolchainSettings,
};