I'm trying to access a function exported by a module in an eval function but I can't find how to do it. Is there a way to do it ?
I guess I could just evaluate the module content, but it seems not optimal.
ex :
let mut rt = Runtime::new(Default::default()).unwrap();
let module_flop = Module::new("flop.mjs", "const flop = () => { console.log('flop'); }; export default flop;");
let flop_handle = rt.load_module(&module_flop).unwrap();
// rt.eval::<()>("import {flop} from './flop.js'"); // import are not allowed here...
rt.eval::<()>("flop();").unwrap();