Skip to main content

Module binary_ops

Module binary_ops 

Source
Expand description

Binary download, hash verification, and cleanup operations for self-update.

This module is responsible for:

  • Determining the platform-specific asset name and download URLs
  • Computing and verifying SHA256 checksums
  • Cleaning up leftover .old binaries from previous updates

Structs§

DownloadUrls
Download URLs for the binary and optional checksum from a GitHub release.

Functions§

cleanup_old_binary
Clean up leftover .old binary from a previous self-update.
compute_data_hash
Compute SHA256 hash of in-memory data, returning the lowercase hex string.
get_asset_name
Get the platform-specific asset name for the current OS/architecture.
get_binary_download_url
Get the download URL for the platform binary from the release API response.
get_checksum_asset_name
Get the checksum asset name for the current platform.
get_download_urls
Get the download URLs for the platform binary and checksum from the release API response.