Function swift_runtime_sys::root::swift_copyAuxiliaryExecutablePath

source ยท
pub unsafe extern "C" fn swift_copyAuxiliaryExecutablePath(
    name: *const c_char,
) -> *mut c_char
Expand description

Return the path of the specified auxiliary executable.

This function will search for the auxiliary executable in the following paths:

/libexec/swift// /libexec/swift/ /bin/ /

It will return the first of those that exists, but it does not test that the file is indeed executable.

On Windows, it will automatically add .exe to the name, which means you do not need to special case the name for Windows.

If you are using this function to locate a utility program for use by the runtime, you should provide a way to override its location using an environment variable.

If the executable cannot be found, it will return nullptr.

\param name The name of the executable to locate.

\return A string containing the full path to the executable. This string should be released with free() when no longer required.