Skip to main content

Module update

Module update 

Source
Expand description

Self-updating functionality for the kasl application.

Provides comprehensive auto-update capabilities that enable the application to automatically check for, download, and install newer versions from GitHub releases.

§Features

  • Safety Mechanisms: Automatic backup, rollback capability, atomic operations
  • Platform Detection: Architecture awareness, OS detection, ABI compatibility
  • Network Resilience: Throttled checks, graceful degradation, retry logic
  • Version Management: Semantic versioning, GitHub API integration
  • Platform Support: Windows, macOS Intel/Apple Silicon, Linux

§Usage

use kasl::libs::update::Updater;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let mut updater = Updater::new()?;
    
    if updater.check_for_latest_release().await? {
        updater.perform_update().await?;
    }
    
    Ok(())
}

Structs§

Updater
Manages the complete application update process from version checking to binary replacement.

Constants§

APP_METADATA_ENCRYPTION_IV
APP_METADATA_ENCRYPTION_KEY
APP_METADATA_NAME
APP_METADATA_OWNER
APP_METADATA_VERSION