pub trait Driver {
type Error: Error + 'static;
Show 14 methods
// Provided methods
fn on_ast(&mut self, _program: &Program) -> Result<(), Self::Error> { ... }
fn on_expanded_ast(&mut self, _program: &Program) -> Result<(), Self::Error> { ... }
fn on_hir(&mut self, _program: &HirProgram) -> Result<(), Self::Error> { ... }
fn on_hir_origins(
&mut self,
_origins: &HirOriginTable,
) -> Result<(), Self::Error> { ... }
fn on_checked(
&mut self,
_program: &CheckedProgram,
) -> Result<(), Self::Error> { ... }
fn on_mir(&mut self, _program: &MirProgram) -> Result<(), Self::Error> { ... }
fn on_mir_origins(
&mut self,
_origins: &MirOriginTable,
) -> Result<(), Self::Error> { ... }
fn on_pass_snapshot(
&mut self,
_snapshot: &PassSnapshot,
) -> Result<(), Self::Error> { ... }
fn on_rust(&mut self, _source: &str) -> Result<(), Self::Error> { ... }
fn on_wat(&mut self, _source: &str) -> Result<(), Self::Error> { ... }
fn on_wasm(&mut self, _bytes: &[u8]) -> Result<(), Self::Error> { ... }
fn on_wasm_diagnostics(
&mut self,
_diagnostics: &[WasmDiagnostic],
) -> Result<(), Self::Error> { ... }
fn on_pass_timings(
&mut self,
_timings: &[PassTiming],
) -> Result<(), Self::Error> { ... }
fn on_provenance_summary(
&mut self,
_summary: ProvenanceSummary,
) -> Result<(), Self::Error> { ... }
}Expand description
Hook interface for observing compiler pipeline outputs.
Required Associated Types§
Provided Methods§
Sourcefn on_ast(&mut self, _program: &Program) -> Result<(), Self::Error>
fn on_ast(&mut self, _program: &Program) -> Result<(), Self::Error>
Observe the parsed AST before meta expansion.
Sourcefn on_expanded_ast(&mut self, _program: &Program) -> Result<(), Self::Error>
fn on_expanded_ast(&mut self, _program: &Program) -> Result<(), Self::Error>
Observe the AST after meta expansion and elaboration.
Sourcefn on_hir_origins(
&mut self,
_origins: &HirOriginTable,
) -> Result<(), Self::Error>
fn on_hir_origins( &mut self, _origins: &HirOriginTable, ) -> Result<(), Self::Error>
Observe side-table provenance ids keyed by HIR expression ids.
Sourcefn on_checked(&mut self, _program: &CheckedProgram) -> Result<(), Self::Error>
fn on_checked(&mut self, _program: &CheckedProgram) -> Result<(), Self::Error>
Observe semantic checker annotations.
Sourcefn on_mir_origins(
&mut self,
_origins: &MirOriginTable,
) -> Result<(), Self::Error>
fn on_mir_origins( &mut self, _origins: &MirOriginTable, ) -> Result<(), Self::Error>
Observe side-table provenance ids keyed by MIR function/local ids.
Sourcefn on_pass_snapshot(
&mut self,
_snapshot: &PassSnapshot,
) -> Result<(), Self::Error>
fn on_pass_snapshot( &mut self, _snapshot: &PassSnapshot, ) -> Result<(), Self::Error>
Observe one pass snapshot emitted by the pipeline.
Sourcefn on_wasm(&mut self, _bytes: &[u8]) -> Result<(), Self::Error>
fn on_wasm(&mut self, _bytes: &[u8]) -> Result<(), Self::Error>
Observe emitted WASM bytes when available.
Sourcefn on_wasm_diagnostics(
&mut self,
_diagnostics: &[WasmDiagnostic],
) -> Result<(), Self::Error>
fn on_wasm_diagnostics( &mut self, _diagnostics: &[WasmDiagnostic], ) -> Result<(), Self::Error>
Observe non-fatal diagnostics from WASM emission.
Sourcefn on_pass_timings(
&mut self,
_timings: &[PassTiming],
) -> Result<(), Self::Error>
fn on_pass_timings( &mut self, _timings: &[PassTiming], ) -> Result<(), Self::Error>
Observe per-pass timing information.
Sourcefn on_provenance_summary(
&mut self,
_summary: ProvenanceSummary,
) -> Result<(), Self::Error>
fn on_provenance_summary( &mut self, _summary: ProvenanceSummary, ) -> Result<(), Self::Error>
Observe aggregate provenance counters for one compile run.