Add/use create_wasi_instance() instead of instantiate_wasi(). (#571)

* Add/use create_wasi_instance() instead of instantiate_wasi().

* rm Result from Instance::from_handle
This commit is contained in:
Yury Delendik
2019-11-15 18:48:05 -06:00
committed by Dan Gohman
parent 9896a5cabd
commit ea56118651
8 changed files with 36 additions and 39 deletions

View File

@@ -58,8 +58,7 @@ pub fn instantiate(data: &[u8], bin_name: &str, workspace: Option<&Path>) -> any
builder.build().context("failed to build wasi context")?,
)
.context("failed to instantiate wasi")?,
)
.context("failed to create instance from handle")?,
),
);
let module = HostRef::new(Module::new(&store, &data).context("failed to create wasm module")?);