Use embedded API in the wasmtime-rust (#540)

This commit is contained in:
Yury Delendik
2019-11-13 09:15:37 -06:00
committed by Alex Crichton
parent 2737c5e8e5
commit 98266498af
13 changed files with 316 additions and 112 deletions

View File

@@ -1,7 +1,7 @@
use crate::context::{create_compiler, Context};
use crate::context::Context;
use crate::r#ref::HostRef;
use crate::HashMap;
use alloc::{boxed::Box, rc::Rc, string::String};
use alloc::{rc::Rc, string::String};
use core::cell::RefCell;
use cranelift_codegen::{ir, settings};
use wasmtime_jit::{CompilationStrategy, Features};
@@ -81,11 +81,6 @@ impl Engine {
pub(crate) fn config(&self) -> &Config {
&self.config
}
pub fn create_wasmtime_context(&self) -> wasmtime_jit::Context {
let flags = self.config.flags().clone();
wasmtime_jit::Context::new(Box::new(create_compiler(flags, self.config.strategy())))
}
}
// Store