Unify Instance in js/sys

This commit is contained in:
Syrus Akbary
2023-02-11 18:01:07 -08:00
parent 58f27ae045
commit 3d56b6bdd6
11 changed files with 205 additions and 238 deletions

View File

@@ -1,7 +1,5 @@
use crate::errors::InstantiationError;
use crate::imports::Imports;
#[cfg(feature = "wat")]
use crate::js::error::WasmError;
use crate::js::externals::Extern;
use crate::js::vm::VMInstance;
use crate::js::AsJs;
@@ -60,6 +58,8 @@ pub struct Module {
raw_bytes: Option<Bytes>,
}
unsafe impl Send for Module {}
impl Module {
/// Creates a new WebAssembly module from a file path.
pub fn from_file(