Function quickjs_runtime::quickjs_utils::modules::new_module

source ·
pub unsafe fn new_module(
    ctx: *mut JSContext,
    name: &str,
    init_func: JSModuleInitFunc,
) -> Result<*mut JSModuleDef, JsError>
Expand description

create new Module (JSModuleDef struct) which can be populated with exports after (and from) the init_func

§Safety

Please ensure the context passed is still valid