Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.
src/project/project.x
X2c project manifests.
Functions
| Function | Summary |
|---|---|
CliRequest.project_manifest | Returns the explicit or nearest readable project manifest, or NULL. |
ProjectBuild.plan | Parses a project manifest and returns its selected target’s build plan. |
ProjectBuild.valid_name | Returns 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
| Type | Kind | Summary |
|---|---|---|
ProjectBuild | struct | Links 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.