// 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 rtiktoken, .registration = TRUE\n\
        NULL\n\
        \n\
    ";
    let footer = "# nolint end\n";
    let wrappers = rtiktoken::get_rtiktoken_metadata()
        .make_r_wrappers(true, "rtiktoken")
        .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(())
}
