Add error types and convert most results to wasmer-runtime results

This commit is contained in:
Lachlan Sneff
2019-01-18 09:17:44 -08:00
parent f5ab605878
commit d23601a810
11 changed files with 303 additions and 80 deletions

View File

@ -1,5 +1,6 @@
use crate::{
backend::FuncResolver,
error::Result,
import::Imports,
sig_registry::SigRegistry,
structures::Map,
@ -47,7 +48,7 @@ impl Module {
}
/// Instantiate a webassembly module with the provided imports.
pub fn instantiate(&self, imports: Imports) -> Result<Instance, String> {
pub fn instantiate(&self, imports: Imports) -> Result<Instance> {
Instance::new(Rc::clone(&self.0), Box::new(imports))
}
}