Skip to main content

generate_package_id

Function generate_package_id 

Source
pub fn generate_package_id(
    registry_handle: &str,
    repo_path: &str,
    package_name: &str,
) -> String
Expand description

Generates a unique, origin-aware ID for a package.

This ID prevents collisions between packages with the same name that reside in different registries or repository tiers.

ID Format: #{registry-handle}@{repo-path}/{package-name} Hashed Result: First 32 characters of the SHA-512 hash of the ID string.