// Generated by extendr: Do not edit by hand
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let wrapper_path = "../R/extendr-wrappers.R";
    let header = "\
        # Generated by extendr: Do not edit by hand\n\
        # nolint start\n\
        \n\
        #' @usage NULL\n\
        #' @useDynLib {{{pkg_name}}}, .registration = TRUE\n\
        NULL\n\
        \n\
    ";
    let footer = "# nolint end\n";
    let wrappers = {{{lib_name}}}::get_{{{mod_name}}}_metadata()
        .make_r_wrappers(true, "{{{pkg_name}}}")
        .map_err(|e| format!("failed to generate wrappers: {e}"))?;
    std::fs::write(wrapper_path, format!("{header}{wrappers}{footer}"))
        .map_err(|e| format!("failed to write {wrapper_path}: {e}"))?;
    Ok(())
}