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

sys openvino-sys

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

20 releases

new 0.7.1 May 29, 2024
0.6.0 Dec 11, 2023
0.5.0 Apr 6, 2023
0.4.2 Oct 21, 2022
0.1.5 Oct 23, 2020

#400 in Machine learning

Download history 5278/week @ 2024-02-07 4478/week @ 2024-02-14 4765/week @ 2024-02-21 4754/week @ 2024-02-28 4329/week @ 2024-03-06 3862/week @ 2024-03-13 4038/week @ 2024-03-20 3844/week @ 2024-03-27 4550/week @ 2024-04-03 6225/week @ 2024-04-10 6092/week @ 2024-04-17 6048/week @ 2024-04-24 6948/week @ 2024-05-01 7179/week @ 2024-05-08 12880/week @ 2024-05-15 6924/week @ 2024-05-22

34,586 downloads per month
Used in 7 crates (via openvino)

Apache-2.0

150KB
2.5K 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, 0);
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–5.5MB