Add new global import api

This commit is contained in:
Lachlan Sneff
2019-01-28 11:55:44 -08:00
parent 1be20b19e7
commit 98305c8731
16 changed files with 209 additions and 229 deletions

View File

@ -9,9 +9,9 @@ pub mod backend;
mod backing;
pub mod error;
pub mod export;
pub mod global;
pub mod import;
pub mod instance;
pub mod global;
pub mod memory;
pub mod module;
mod sig_registry;
@ -30,7 +30,7 @@ pub use self::error::Result;
pub use self::instance::Instance;
#[doc(inline)]
pub use self::module::Module;
use std::rc::Rc;
use std::sync::Arc;
pub mod prelude {
pub use crate::import::{ImportObject, Namespace};
@ -56,7 +56,7 @@ pub fn compile_with(
let token = backend::Token::generate();
compiler
.compile(wasm, token)
.map(|inner| module::Module::new(Rc::new(inner)))
.map(|inner| module::Module::new(Arc::new(inner)))
}
/// Perform validation as defined by the