Backend

Trait Backend 

Source
pub trait Backend {
    // Required methods
    fn name(&self) -> &'static str;
    fn primary_target(&self) -> CompilationTarget;
    fn match_score(&self, target: &CompilationTarget) -> f32;
    fn generate(
        &self,
        program: &GaiaProgram,
        config: &GaiaConfig,
    ) -> Result<GeneratedFiles>;
}
Expand description

Backend compiler trait

Required Methods§

Source

fn name(&self) -> &'static str

Get backend name

Source

fn primary_target(&self) -> CompilationTarget

获取此后端支持的主要编译目标

Source

fn match_score(&self, target: &CompilationTarget) -> f32

计算与给定编译目标的匹配度 (0-100) 0 表示不支持

Source

fn generate( &self, program: &GaiaProgram, config: &GaiaConfig, ) -> Result<GeneratedFiles>

Compile Gaia program to target platform

Implementors§