got imorts working

This commit is contained in:
elfein 2021-11-10 21:56:35 -08:00
parent 2840c8ae97
commit 04859555e9

View file

@ -82,9 +82,11 @@ fn main() {
// Load wasm binary and prepare it for instantiation.
let module = wasmi::Module::from_buffer(&wasm_binary).expect("failed to load wasm");
let imports = ImportsBuilder::new().with_resolver("host", &HostFunctions);
// Instantiate a module with empty imports and
// assert that there is no `start` function.
let instance = ModuleInstance::new(&module, &ImportsBuilder::default())
let instance = ModuleInstance::new(&module, &imports)
.expect("failed to instantiate wasm module")
.assert_no_start();