Trait exers::compilers::Compiler

source ·
pub trait Compiler<R: CodeRuntime>: Send + Sync + Sized {
    type Config: Send + Sync + Sized + Debug + Clone + Default + IntoArgs;

    // Required method
    fn compile(
        &self,
        code: &mut impl Read,
        config: Self::Config
    ) -> CompilationResult<CompiledCode<R>>;
}
Expand description

Trait for every compiler that can be used to compile some code.

Required Associated Types§

source

type Config: Send + Sync + Sized + Debug + Clone + Default + IntoArgs

Configuration for the compiler.

Required Methods§

source

fn compile( &self, code: &mut impl Read, config: Self::Config ) -> CompilationResult<CompiledCode<R>>

Compile the given code (as stream of bytes) and return the executable (in temporary file).

Implementors§