pub unsafe extern "C" fn weld_module_run(
    module: weld_module_t,
    context: weld_context_t,
    arg: weld_value_t,
    err: weld_error_t,
) -> weld_value_t {
    let module = module as *mut weld::WeldModule;
    let module = &mut *module;
    let context = context as *mut weld::WeldContext;
    let context = &mut *context;
    let arg = arg as *mut weld::WeldValue;
    let arg = &*arg;
    let err = err as *mut weld::WeldError;
    let err = &mut *err;

    match module.run(context, arg) {
        Ok(result) => {
            *err = weld::WeldError::new_success();
            Box::into_raw(Box::new(result)) as _
        }
        Err(runtime_err) => {
            eprintln!("{:?}", runtime_err);
            *err = runtime_err;
            ptr::null_mut() as _
        }
    }
}
Runs a compiled Weld module.

The module is run with a given configuration and argument list, and returns the result wrapped
as a `WeldValue`. If the run raised a runtime error, the method writes the erorr into `err`,
and a the method returns `null`. Otherwise, `err` indicates success.

This function is a wrapper for `WeldModule::run`.
weld-capi/src/lib.rs