quickjs-rs
quickjs-rs copied to clipboard
Module Loading Support
Hi,
Thank you so much for this wrapper!
I'm running into some problems when loading modules, all I get back is ReferenceError: could not load module
when running for example the following:
use quick_js::{Context};
fn main() {
let context = Context::new().unwrap();
let value = context.eval_as::<String>("(async () => {const test = await import('./js/module.js'); return test();})();").unwrap();
println!("{}", &value);
}
With this in module.js:
export default () => {
return 'Not working?';
};
Am I missing something obvious or is this just not supported yet?
Module loading is not supported yet.
I have some initial work on it, I should be able to get to it next week. It won't be enabled by default though due to security concerns.