#machine-learning #neural-network #unsafe-bindings #api-bindings #openvino

sys openvino-sys

Low-level bindings for OpenVINO (use the openvino crate for easier-to-use bindings)

23 releases

0.8.0 Oct 15, 2024
0.7.2 Jun 26, 2024
0.6.0 Dec 11, 2023
0.5.0 Apr 6, 2023
0.1.5 Oct 23, 2020

#668 in Machine learning

Download history 17448/week @ 2024-08-17 13903/week @ 2024-08-24 15284/week @ 2024-08-31 16632/week @ 2024-09-07 18559/week @ 2024-09-14 15144/week @ 2024-09-21 15197/week @ 2024-09-28 22836/week @ 2024-10-05 10797/week @ 2024-10-12 13226/week @ 2024-10-19 14100/week @ 2024-10-26 18644/week @ 2024-11-02 15937/week @ 2024-11-09 19976/week @ 2024-11-16 12969/week @ 2024-11-23 21631/week @ 2024-11-30

72,479 downloads per month
Used in 7 crates (via openvino)

Apache-2.0

145KB
2K SLoC

openvino-sys

The openvino-sys crate provides low-level, unsafe, Rust bindings to OpenVINO™ using its C API. If you are looking to use OpenVINO™ from Rust, you likely should look at the ergonomic, safe bindings in openvino, which depends on this crate. See the repository README for more information, including instructions for configuring this crate at build time.


lib.rs:

This crate provides low-level, unsafe, Rust bindings to OpenVINO™ using its C API. If you are looking to use OpenVINO™ from Rust, you likely should look at the ergonomic, safe bindings in openvino, which depends on this crate. See the repository README for more information, including build instructions.

An example interaction with raw openvino-sys:

openvino_sys::library::load().expect("to have an OpenVINO library available");
let mut ov_version = openvino_sys::ov_version_t {
    // Initialize the fields to default values
    description: std::ptr::null(),
    buildNumber: std::ptr::null(),
};
let code = unsafe { openvino_sys::ov_get_openvino_version(&mut ov_version) };
assert_eq!(code, openvino_sys::ov_status_e::OK);
let version_ptr = { ov_version }.buildNumber;
let string_version = unsafe { CStr::from_ptr(version_ptr) }.to_string_lossy().into_owned();
unsafe { openvino_sys::ov_version_free(std::ptr::addr_of_mut!(ov_version)) };
assert!(string_version.starts_with("2"));

Dependencies

~0–4.5MB