nip/src/nimpak/types.nim

22 lines
650 B
Nim

# SPDX-License-Identifier: LSL-1.0
# Copyright (c) 2026 Markus Maiwald
# Stewardship: Self Sovereign Society Foundation
#
# This file is part of the Nexus Sovereign Core.
# See legal/LICENSE_SOVEREIGN.md for license terms.
# nimpak/types.nim
# Core data structures and types for the NimPak system
import std/[hashes]
# Re-export the comprehensive types from types_fixed
include types_fixed
# Additional hash function for PackageId
proc hash*(pkg: PackageId): Hash =
hash((pkg.name, pkg.version, pkg.stream))
# String conversion for debugging
proc `$`*(pkg: PackageId): string =
result = pkg.name & "-" & pkg.version & "[" & $pkg.stream & "]"