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

@ -4,26 +4,23 @@ mod backend;
mod backing;
mod instance;
mod memory;
mod sig_registry;
mod table;
mod recovery;
mod sighandler;
pub mod mmap;
pub mod module;
mod recovery;
mod sig_registry;
mod sighandler;
mod table;
pub mod types;
pub mod vm;
pub mod vmcalls;
pub use self::backend::{Compiler, FuncResolver};
pub use self::instance::{Import, ImportResolver, Imports, Instance};
pub use self::memory::LinearMemory;
pub use self::module::{Module, ModuleInner};
pub use self::sig_registry::SigRegistry;
pub use self::memory::LinearMemory;
/// Compile a webassembly module using the provided compiler.
pub fn compile(
wasm: &[u8],
compiler: &dyn Compiler,
) -> Result<Module, String> {
pub fn compile(wasm: &[u8], compiler: &dyn Compiler) -> Result<Module, String> {
compiler.compile(wasm)
}
}