Add export_func macro, prelude, and rename imports stuff

This commit is contained in:
Lachlan Sneff
2019-01-21 14:43:04 -08:00
parent c25fce1721
commit 10c5aa02a2
13 changed files with 81 additions and 63 deletions

View File

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