pub trait Phase: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn run(&self, ctx: &mut CompilationContext) -> Result<()>;
// Provided method
fn info(&self) -> PhaseInfo { ... }
}Expand description
A phase in the compilation pipeline.
Phases are executed in order by the pipeline. Each phase can read and modify the compilation context, adding to the IR, computed data, or diagnostics.
Built-in phases:
ValidatePhase- validates the manifest and collects diagnosticsLowerPhase- transforms manifest to Application IRAnalyzePhase- computes shared data from IR
Custom phases can be added to the pipeline for additional processing.
Required Methods§
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
A human-readable description of what this phase does.