pub trait Backend {
type Output;
// Required methods
fn name(&self) -> &str;
fn lower_module(&mut self, module: &mut Module) -> Self::Output;
}Expand description
A code generation backend that lowers MIR to a target artifact.
Required Associated Types§
Required Methods§
Sourcefn lower_module(&mut self, module: &mut Module) -> Self::Output
fn lower_module(&mut self, module: &mut Module) -> Self::Output
Lowers a module to this backend’s output artifact. Takes &mut so the
backend can run its own target-specific passes over the MIR first.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".