Skip to main content

resolve_ext_component_with_dist

Function resolve_ext_component_with_dist 

Source
pub fn resolve_ext_component_with_dist(
    pack_dir: &Path,
    raw_ref: &str,
    cache_dir: &Path,
    offline: bool,
    handle: Option<&Handle>,
) -> Result<(Vec<u8>, String)>
Expand description

Cache/handle-aware entry point that resolves an ext://<id>#component ref, acquiring the extension .gtxpack over the network when its declared source is store:// (and, guarded, oci://). file:///bare sources behave exactly as resolve_ext_component.

  • cache_dir is the runtime cache dir (downloaded artifacts are cached under it).
  • offline disables network fetches and forces cache-only resolution.
  • handle is an optional current Tokio runtime handle; the store path uses blocking reqwest on a dedicated thread, so it does not require one.