Function openvino_sys::library::find

source ·
pub fn find() -> Option<PathBuf>
Expand description

Return the location of the shared library openvino-sys will link to. If compiled with runtime linking, this will attempt to discover the location of a openvino_c shared library on the system. Otherwise (with dynamic linking or compilation from source), this relies on a static path discovered at build time.

Knowing the location of the OpenVINO libraries is critical to avoid errors, unfortunately. OpenVINO loads target-specific libraries on demand for performing inference. To do so, it relies on a plugins.xml file that maps targets (e.g. CPU) to the target-specific implementation library. At runtime, users must pass the path to this file so that OpenVINO can inspect it and load the required libraries to satisfy the user’s specified targets. By default, the plugins.xml file is found in the same directory as the libraries, e.g. find().unwrap().parent().