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 |
#628 in Machine learning
65,979 downloads per month
Used in 7 crates
(via openvino)
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