Skip to main content

compute_extension_load_hint

Function compute_extension_load_hint 

Source
pub fn compute_extension_load_hint(
    error: &str,
    plugin_dir: &Path,
    declared_setup: Option<&str>,
) -> String
Expand description

Compute the hint for an extension load failure.

Two cases:

  1. Missing extension binary AND plugin declares provides.sidecar.setup — the plugin ships source only (the binary is typically gitignored) and the setup script needs to be run. The hint points the user at the exact command. This is the common case for fresh marketplace installs of plugins that build their extension binary from source.
  2. Anything else — the generic “run plugin validate” hint.

Pure function for unit-testability. Lives here (not in ExtensionLoadFailure) because the sidecar/setup convention is a plugin-layer concern.