Feature
I would like to change my code from:
let module1 = Module::from_file(&store, "a.wasm")?;
let instance1 = linker.instantiate(&module1)?;
linker.instance("env", &instance1)?;
let run = instance1.get_export("funca").and_then(|e| e.func()).unwrap();
let run = run.get0::<()>()?;
run()?;
to:
let module1 = Module::from_file(&store, "a.wasm")?;
let instance1 = linker.instantiate(&module1)?;
linker.instance("env", &instance1)?;
let run = linker.get_export("env","funca").and_then(|e| e.func()).unwrap();
let run = run.get0::<()>()?;
run()?;
Benefit
Get exports from one source (Linker).
Implementation
Add a new method Linker::get_export(module,name).
Alternatives
Please, see the existing solution above.
Feature
I would like to change my code from:
to:
Benefit
Get exports from one source (Linker).
Implementation
Add a new method Linker::get_export(module,name).
Alternatives
Please, see the existing solution above.