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§
Required Methods§
sourcefn compile(
&self,
code: &mut impl Read,
config: Self::Config
) -> CompilationResult<CompiledCode<R>>
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§
source§impl Compiler<NativeRuntime> for CppCompiler
impl Compiler<NativeRuntime> for CppCompiler
type Config = CppCompilerConfig
source§impl Compiler<NativeRuntime> for PythonCompiler
impl Compiler<NativeRuntime> for PythonCompiler
Compiler for native runtime.
type Config = PythonCompilerConfig
source§impl Compiler<NativeRuntime> for RustCompiler
impl Compiler<NativeRuntime> for RustCompiler
type Config = RustCompilerConfig
source§impl Compiler<WasmRuntime> for CppCompiler
impl Compiler<WasmRuntime> for CppCompiler
type Config = CppCompilerConfig
source§impl Compiler<WasmRuntime> for PythonCompiler
impl Compiler<WasmRuntime> for PythonCompiler
type Config = PythonCompilerConfig
source§impl Compiler<WasmRuntime> for RustCompiler
impl Compiler<WasmRuntime> for RustCompiler
type Config = RustCompilerConfig
source§impl<C> Compiler<JailedRuntime> for Cwhere
C: Compiler<NativeRuntime>,
impl<C> Compiler<JailedRuntime> for Cwhere C: Compiler<NativeRuntime>,
Implementation of JailedRuntime compiler for every native compiler.