find_helper_binary

Function find_helper_binary 

Source
pub fn find_helper_binary(binary_name: &str) -> Result<PathBuf, String>
Expand description

Find a pre-built helper binary in the target directory.

This function:

  1. Uses the current executable’s path to locate the target directory
  2. Looks for the binary in the debug or release subdirectory
  3. If RAPACE_PREBUILT_HELPERS is set, fails immediately if not found
  4. Otherwise, returns an error that tests can use to decide whether to build inline

§Arguments

  • binary_name - The name of the helper binary (e.g., “diagnostics-plugin-helper”)

§Returns

Ok(PathBuf) if the binary is found, Err(String) with an error message otherwise.

§Panics

If RAPACE_PREBUILT_HELPERS is set and the binary is not found.