Skip to main content

Module asset

Module asset 

Source
Expand description

Asset selection for the running host.

§Grammar

The default asset-name pattern is {name}-{version}-{target}{ext}. Tool authors override via rtb_app::metadata::ToolMetadata::update_asset_pattern.

Placeholders:

PlaceholderValue
{name}rtb_app::metadata::ToolMetadata::name
{version}Release tag with any leading v stripped
{target}Rust host triple (e.g. x86_64-unknown-linux-gnu)
{os}linux, macos, windows
{arch}x86_64, aarch64
{ext}.tar.gz on Unix / .zip on Windows

All occurrences of each placeholder are replaced. Unknown placeholders pass through verbatim — useful when a tool author embeds release-pipeline-specific substitutions we haven’t anticipated yet.

Constants§

DEFAULT_PATTERN
Default pattern — matches the release-pipeline conventions we recommend to tool authors.

Functions§

host_substitutions
Return (os, arch, target_triple, ext) for the running binary.
pick_asset
Pick the asset on release whose name matches expected.
pick_signature
Find the signature file for asset on release. Preference: .minisig over .sig (minisign format carries more context when things go wrong). Returns None if neither is present.
render_pattern
Render the asset pattern with host + release substitutions.