Skip to main content

Module update

Module update 

Source
Expand description

The signed release manifest behind unv update (Phase 54, roadmap R26).

Same shape as the provider catalogue (an Ed25519 signature over the exact payload bytes, then a shape check) but with its own key, so a leaked catalogue key cannot ship a binary and the reverse. A manifest names one version and, per platform, one archive with its SHA-256 and size. Nothing here does I/O beyond reading the running executable’s path.

UPDATE_KEY_HEX is empty until the maintainer generates the update key and pins its public half; with no key pinned every verify is refused, so a build without one can never self-update by accident.

Structs§

Asset
Manifest

Enums§

Origin

Constants§

DEFAULT_URL
Where the release job publishes the signed CLI manifest.
SCHEMA
STANDALONE_MARKER
File the release archives ship beside the executable. Only a binary that sits next to it was unpacked from a standalone archive and may replace itself.
UPDATE_KEY_HEX
Public half of the update-signing key (64 hex digits). Empty = not pinned. Never reuse the catalogue key here.

Functions§

classify
Classify an executable path. marker_dir_has_marker is whether STANDALONE_MARKER exists beside it (passed in so this stays pure).
current_target
The target string for the running binary, matching the release archive names. A musl build (Alpine) gets its own -musl archive: the glibc one will not start there.
parse_version
x.y.z as numbers; anything else (pre-release, build metadata) is refused so a manifest cannot smuggle in an ordering this code does not understand.
pinned_key
sha256_hex
Lowercase hex SHA-256 of bytes.
sign
Publisher side: sign m with a 32-byte Ed25519 seed.
verify
Check signature, then shape. Does not compare versions.