2019-10-30 13:28:01 +01:00
|
|
|
pub use wabt::wat2wasm;
|
2020-04-09 14:37:21 -07:00
|
|
|
use wasmer::compiler::Compiler;
|
2019-10-30 13:28:01 +01:00
|
|
|
|
|
|
|
#[cfg(feature = "backend-cranelift")]
|
|
|
|
pub fn get_compiler() -> impl Compiler {
|
|
|
|
use wasmer_clif_backend::CraneliftCompiler;
|
|
|
|
|
|
|
|
CraneliftCompiler::new()
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "backend-singlepass")]
|
|
|
|
pub fn get_compiler() -> impl Compiler {
|
|
|
|
use wasmer_singlepass_backend::SinglePassCompiler;
|
|
|
|
SinglePassCompiler::new()
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "backend-llvm")]
|
|
|
|
pub fn get_compiler() -> impl Compiler {
|
|
|
|
use wasmer_llvm_backend::LLVMCompiler;
|
|
|
|
LLVMCompiler::new()
|
|
|
|
}
|