mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 22:28:21 +00:00
Add wip solution to wasm_extern_as_ no allocation
This commit is contained in:
@@ -390,10 +390,7 @@ fn wasi_get_imports_inner(
|
||||
}));
|
||||
let inner = Extern::from_vm_export(store, export);
|
||||
|
||||
Some(Box::new(wasm_extern_t {
|
||||
instance: None,
|
||||
inner,
|
||||
}))
|
||||
Some(Box::new(inner.into()))
|
||||
})
|
||||
.collect::<Option<Vec<_>>>()?
|
||||
.into();
|
||||
@@ -407,10 +404,7 @@ pub unsafe extern "C" fn wasi_get_start_function(
|
||||
) -> Option<Box<wasm_func_t>> {
|
||||
let start = c_try!(instance.inner.exports.get_function("_start"));
|
||||
|
||||
Some(Box::new(wasm_func_t {
|
||||
inner: start.clone(),
|
||||
instance: Some(instance.inner.clone()),
|
||||
}))
|
||||
Some(Box::new(wasm_func_t::new(start.clone())))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user