Skip to main content

Module resolve

Module resolve 

Source
Expand description

Asset filename resolution for the plugin manager.

With the v0.2.0 component model migration, plugin artefacts are platform-independent .wasm files — no per-OS / per-arch suffix. The default template is {name}.wasm and the legacy {os} / {arch} / {ext} tokens are rejected with a migration message (the plugin author must republish a single .wasm asset).

See docs/superpowers/specs/2026-04-27-wasm-plugin-runtime-design.md §7 for the rationale.

Constants§

DEFAULT_TEMPLATE
Default asset filename template. v0.2.0+: a single platform-independent .wasm file per plugin.

Functions§

asset_filename
Get the resolved asset filename for a plugin, using custom or default template. The custom template, if provided, must already have passed check_asset_template.
check_asset_template
Reject templates that reference platform-specific tokens. Plugins are distributed as single platform-independent .wasm files in v0.2.0+.
normalize_name
Convert plugin name to a form suitable for library names: hyphens become underscores. Kept for backwards-compatibility with existing templates; new .wasm artefacts typically use the plugin name as-is.
resolve_template
Resolve an asset template by replacing {name}. Other historical tokens ({os}, {arch}, {ext}) are no longer supported and the caller should have rejected them via check_asset_template; for safety we still treat them as plain text here.