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

sys openvino-sys

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

21 releases

0.7.2 Jun 26, 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

#406 in Machine learning

Download history 4407/week @ 2024-04-04 6306/week @ 2024-04-11 6625/week @ 2024-04-18 5490/week @ 2024-04-25 7323/week @ 2024-05-02 7113/week @ 2024-05-09 13967/week @ 2024-05-16 8909/week @ 2024-05-23 11935/week @ 2024-05-30 10904/week @ 2024-06-06 15138/week @ 2024-06-13 14389/week @ 2024-06-20 14601/week @ 2024-06-27 10885/week @ 2024-07-04 13211/week @ 2024-07-11 12869/week @ 2024-07-18

54,263 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