Add wip solution to wasm_extern_as_ no allocation

This commit is contained in:
Mark McCaskey
2021-03-23 09:01:01 -07:00
parent 4026b3ab99
commit 9868c0f297
9 changed files with 148 additions and 39 deletions

View File

@@ -192,10 +192,7 @@ pub unsafe extern "C" fn wasm_instance_exports(
None
};
Box::into_raw(Box::new(wasm_extern_t {
instance: Some(Arc::clone(instance)),
inner: r#extern.clone(),
}))
Box::into_raw(Box::new(r#extern.clone().into()))
})
.collect::<Vec<*mut wasm_extern_t>>();
extern_vec.shrink_to_fit();