Plugin System
Defined in src/pipeline.rs:
IrModule → [IrPass, IrPass, ...] → IrModule → Backend → Output
IrPass: Takes ownership ofIrModule, transforms it, returnsResult<IrModule, Vec<CompilerError>>. Use for optimization, specialization, or lowering. A failing pass aborts the pipeline and returns its errors.Backend: Borrows anIrModule, produces anyOutputtype. Use for code generation.Pipeline: Chains passes with.pass(...)and drives a backend with.emit(module, &backend).
For a tour of the passes shipped in the box, see Built-in Passes.