Remove usage of Features from wasmtime::Config API (#763)
Instead expose a number of boolean accessors which doesn't require users to construct a foreign `Features` type and allows us to decouple the API of the `wasmtime` crate from the underlying implementation detail.
This commit is contained in:
@@ -16,7 +16,6 @@ doctest = false
|
||||
|
||||
[dependencies]
|
||||
wasmtime-interface-types = { path = "../../interface-types" }
|
||||
wasmtime-jit = { path = "../../jit" }
|
||||
wasmtime-rust-macro = { path = "./macro" }
|
||||
wasmtime-wasi = { path = "../../wasi" }
|
||||
wasmtime = { path = "../../api" }
|
||||
|
||||
@@ -51,12 +51,7 @@ fn generate_load(item: &syn::ItemTrait) -> syn::Result<TokenStream> {
|
||||
use #root::wasmtime::{HostRef, Config, Extern, Engine, Store, Instance, Module};
|
||||
use #root::anyhow::{bail, format_err};
|
||||
|
||||
let mut config = Config::new();
|
||||
config.features(#root::wasmtime_jit::Features {
|
||||
multi_value: true,
|
||||
..Default::default()
|
||||
});
|
||||
let engine = Engine::new(&config);
|
||||
let engine = Engine::new(Config::new().wasm_multi_value(true));
|
||||
let store = HostRef::new(Store::new(&engine));
|
||||
let global_exports = store.borrow().global_exports().clone();
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ pub mod __rt {
|
||||
pub use anyhow;
|
||||
pub use wasmtime;
|
||||
pub use wasmtime_interface_types;
|
||||
pub use wasmtime_jit;
|
||||
pub use wasmtime_wasi;
|
||||
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
Reference in New Issue
Block a user