Add function to get export from ns/name via ImportObject to C API

This commit is contained in:
Mark McCaskey
2019-10-09 17:29:27 -07:00
parent bfb9d3849c
commit 913354adb3
5 changed files with 184 additions and 14 deletions

View File

@ -75,6 +75,7 @@ pub unsafe extern "C" fn wasmer_instantiate(
let namespace = namespaces.entry(module_name).or_insert_with(Namespace::new);
// TODO check that tag is actually in bounds here
let export = match import.tag {
wasmer_import_export_kind::WASM_MEMORY => {
let mem = import.value.memory as *mut Memory;