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/project.x

X2c project manifests.

Functions

FunctionSummary
CliRequest.project_manifestReturns the explicit or nearest readable project manifest, or NULL.
ProjectBuild.planParses a project manifest and returns its selected target’s build plan.
ProjectBuild.valid_nameReturns whether a target, profile, or manifest field name contains only letters, digits, underscores, and hyphens, and is not empty.

CliRequest

CliRequest.project_manifest

String CliRequest.project_manifest(CliRequest c)

Returns the explicit or nearest readable project manifest, or NULL. Discovery uses the same request view as project parsing.

Source: src/project/planning.x:41

ProjectBuild

ProjectBuild.plan

ProjectBuild ProjectBuild.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/planning.x:12

ProjectBuild.valid_name

int ProjectBuild.valid_name(String name)

Returns whether a target, profile, or manifest field name contains only letters, digits, underscores, and hyphens, and is not empty.

Source: src/project/manifest.x:322

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. ProjectBuild.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/project.x:19

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.