pub unsafe extern "C" fn weld_module_compile(
    code: *const c_char,
    conf: weld_conf_t,
    err: weld_error_t,
) -> weld_module_t {
    let code = code.to_str();
    let conf = conf as *mut weld::WeldConf;
    let conf = &*conf;
    let err = err as *mut weld::WeldError;
    let err = &mut *err;
    match weld::WeldModule::compile(code, conf) {
        Ok(module) => {
            *err = weld::WeldError::new_success();
            Box::into_raw(Box::new(module)) as _
        }
        Err(compile_err) => {
            *err = compile_err;
            ptr::null_mut() as _
        }
    }
}
Compiles a Weld program into a runnable module.

The compilation can be configured using the passed configuration pointer. This function stores
an error (which indicates a compilation error or success) in `err`.

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