Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

src/project.x

X2c project manifests.

Functions

FunctionSummary
project_planParses a project manifest and returns its selected target’s build plan.

Functions

project_plan

ProjectBuild project_plan(CliRequest request)

Parses a project manifest and returns its selected target’s build plan. request must be a build or run request with no explicit operands. The result contains each dependency once before its consumer and lowers manifest fields and command-line overrides to ordinary CliRequest values without executing build actions. Manifest discovery, parsing, validation, or target-selection failures print a diagnostic and exit with status 2.

Source: src/project.x:714

Public types

TypeKindSummary
ProjectBuildstructLinks native build requests in dependency-first order.

ProjectBuild

typedef struct ProjectBuild { CliRequest request; struct ProjectBuild *next; } *ProjectBuild

Links native build requests in dependency-first order. project_plan returns the head. Each node and copied CliRequest struct is owned by the current Scope and needs no individual cleanup; its String and List fields retain their canonical pool lifetimes and may share values with the command request.

Source: src/project.x:22

Design notes

A project manifest defines source membership, deterministic glob expansion, target relationships, and named profiles. Resolved targets lower to the same CliRequest a direct build uses.