auto_downloader 0.2.0

Rust cargo crates with auto-update functionality.
Documentation
use auto_downloader::get_version_info;
use std::process::Command;

fn main() {
    let current_version = "1.0.0";
    let info_url = "https://example.com/version_info.json";

    match get_version_info(info_url) {
        Ok(info) if info.version != current_version => {
            println!("Update available. Launching updater...");
            Command::new("updater")
                .spawn()
                .expect("Failed to launch updater");
            std::process::exit(0);
        }
        Ok(_) => println!("✅ You're up to date!"),
        Err(e) => eprintln!("Failed to check version: {}", e),
    }

    // Your real app logic goes here
    println!("🧠 Main app is running...");
}



/*


{
    "version": "1.0.1",
    "download_url": "https://example.com/your_application_1.0.1.exe",
    "sha256_checksum": "d73d56b328d5a8ffdf27430edb4d9d68e1e2a8f2c3e2656c672e4f6b76153a2b",
    "app_name": "your_application.exe"
}




*/