pub trait Backend {
// Required methods
fn name(&self) -> &'static str;
fn primary_target(&self) -> CompilationTarget;
fn artifact_type(&self) -> ArtifactType;
fn match_score(&self, target: &CompilationTarget) -> f32;
fn generate(
&self,
program: &GaiaModule,
config: &GaiaConfig,
) -> Result<GeneratedFiles>;
}Expand description
Backend compiler trait
Required Methods§
Sourcefn primary_target(&self) -> CompilationTarget
fn primary_target(&self) -> CompilationTarget
Get the primary compilation target supported by this backend.
Sourcefn artifact_type(&self) -> ArtifactType
fn artifact_type(&self) -> ArtifactType
Get the type of artifact generated by this backend.
Sourcefn match_score(&self, target: &CompilationTarget) -> f32
fn match_score(&self, target: &CompilationTarget) -> f32
Calculate the match score (0-100) for the given compilation target. A score of 0 indicates that the target is not supported.
Sourcefn generate(
&self,
program: &GaiaModule,
config: &GaiaConfig,
) -> Result<GeneratedFiles>
fn generate( &self, program: &GaiaModule, config: &GaiaConfig, ) -> Result<GeneratedFiles>
Compile Gaia program to target platform
Implementors§
impl Backend for ClrBackend
Available on crate feature
clr-assembler only.impl Backend for DotNetBackend
impl Backend for ElfBackend
impl Backend for GcnBackend
impl Backend for JvmBackend
impl Backend for LlvmBackend
impl Backend for LuaBackend
impl Backend for MachoBackend
impl Backend for MslBackend
impl Backend for NyarBackend
impl Backend for PythonBackend
impl Backend for SassBackend
impl Backend for SpirvBackend
impl Backend for WasiBackend
impl Backend for WindowsBackend
impl Backend for X86Backend
impl Backend for X64Backend
Available on crate feature
x86_64-assembler only.