1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-07-24 20:02:04 +00:00

kwasm imports

This commit is contained in:
Heyang Zhou
2019-05-04 08:28:13 -07:00
parent af0b1476f3
commit c4e4efc694
5 changed files with 46 additions and 5 deletions
lib
kwasm-loader
runtime-core
src/bin

@@ -449,10 +449,17 @@ fn import_functions(
});
}
None => {
link_errors.push(LinkError::ImportNotFound {
namespace: namespace.to_string(),
name: name.to_string(),
});
if imports.allow_missing_functions {
functions.push(vm::ImportedFunc {
func: ::std::ptr::null(),
vmctx: ::std::ptr::null_mut(),
});
} else {
link_errors.push(LinkError::ImportNotFound {
namespace: namespace.to_string(),
name: name.to_string(),
});
}
}
}
}