pub fn ar_builder(app_name: String, build_dir: &str) -> Result<(), String> {
    let obj_file_name = format!("{}/{}.o", build_dir, app_name);
    let a_file_name = format!("{}/lib{}.a", build_dir, app_name);

    Command::new("ar")
        .args(&["crs", &a_file_name, &obj_file_name])
        .spawn()
        .map_err(|_| "Failed to run `ar` command".to_string())?
        .wait()
        .map_err(|_| "Failed to process `ar` command".to_string())?;
    Ok(())
}
/// Run `ar` tool for link libraries to static lib
Run `ar` tool for link libraries to static lib
Run ` ar ` tool for link libraries to static lib
pub fn ar_builder(app_name: String, build_dir: &str) -> Result<(), String> {
    let obj_file_name = format!("{}/{}.o", build_dir, app_name);
    let a_file_name = format!("{}/lib{}.a", build_dir, app_name);
    Command::new("ar")
        .args(&["crs", &a_file_name, &obj_file_name])
        .spawn()
        .map_err(|_| "Failed to run `ar` command".to_string())?
        .wait()
        .map_err(|_| "Failed to process `ar` command".to_string())?;
    Ok(())
}
pub fn ar_builder ( app_name : String , build_dir : & str ) -> Result < ( ) , String > { let obj_file_name = format ! ( " " build_dir app_name ) ; let a_file_name = format ! ( " " build_dir app_name ) ; Command :: new ( " " ) . args ( & [ " " , & a_file_name , & obj_file_name ] ) . spawn ( ) . map_err ( | _ | " " . to_string ( ) ) ? . wait ( ) . map_err ( | _ | " " . to_string ( ) ) ? ; Ok ( ( ) ) }
Run `ar` tool for link libraries to static lib
Run ` ar ` tool for link libraries to static lib
app_name
String
build_dir
&str