Support imported functions

This commit is contained in:
Lachlan Sneff
2019-01-08 21:57:28 -05:00
parent 55b7cae523
commit bba168e61e
14 changed files with 265 additions and 151 deletions

View File

@ -1,16 +1,15 @@
use crate::{
backend::FuncResolver,
types::{
FuncIndex, Global, GlobalDesc, GlobalIndex, Map, MapIndex, Memory, MemoryIndex,
SigIndex, Table, TableIndex,
},
sig_registry::SigRegistry,
ImportResolver,
Instance,
types::{
FuncIndex, Global, GlobalDesc, GlobalIndex, Map, MapIndex, Memory, MemoryIndex, SigIndex,
Table, TableIndex,
},
ImportResolver, Instance,
};
use std::sync::Arc;
use std::ops::Deref;
use hashbrown::HashMap;
use std::ops::Deref;
use std::sync::Arc;
/// This is used to instantiate a new webassembly module.
pub struct ModuleInner {
@ -56,13 +55,12 @@ impl ModuleInner {
impl Deref for Module {
type Target = ModuleInner;
fn deref(&self) -> &ModuleInner {
&*self.0
}
}
#[derive(Debug, Clone)]
pub struct ImportName {
pub module: String,