Remove Backend dependency

This commit is contained in:
Syrus
2019-12-20 20:11:56 -08:00
parent d4e964519d
commit d7154fe791
15 changed files with 127 additions and 64 deletions

View File

@ -18,7 +18,7 @@ use std::mem;
use std::sync::{Arc, RwLock};
use wasmer_runtime_core::error::CompileError;
use wasmer_runtime_core::{
backend::{Backend, CacheGen, Token},
backend::{CacheGen, Token},
cache::{Artifact, Error as CacheError},
codegen::*,
memory::MemoryType,
@ -58,8 +58,8 @@ impl ModuleCodeGenerator<CraneliftFunctionCodeGenerator, Caller, CodegenError>
unimplemented!("cross compilation is not available for clif backend")
}
fn backend_id() -> Backend {
Backend::Cranelift
fn backend_id() -> String {
"cranelift".to_string()
}
fn check_precondition(&mut self, _module_info: &ModuleInfo) -> Result<(), CodegenError> {