hailort_sys/lib.rs
1//! Raw FFI bindings to the HailoRT runtime library.
2//!
3//! These bindings mirror the C API declared in `<hailo/hailort.h>` from the
4//! [hailo-ai/hailort](https://github.com/hailo-ai/hailort) open-source project.
5//! They give Rust code direct access to the Hailo AI HAT+ on Raspberry Pi.
6//!
7//! # Safety
8//! Every function in the [`ffi`] module is `unsafe`. Callers must uphold all
9//! invariants described in the upstream C API documentation:
10//! <https://hailo.ai/developer-zone/>
11//!
12//! # Linking
13//! The `build.rs` script attempts `pkg-config` first, then falls back to
14//! searching `/usr/lib` and `/usr/local/lib` for `libhailort.so`.
15//!
16//! # Module layout
17//! | Module | Contents |
18//! |--------|----------|
19//! | [`constants`] | Sizing limits and default parameter values |
20//! | [`handles`] | Opaque C handle types |
21//! | [`status`] | `hailo_status` return code and all error constants |
22//! | [`enums`] | All other C enum type aliases and their variants |
23//! | [`types`] | Structs, unions, and callback type aliases |
24//! | [`ffi`] | `unsafe extern "C"` function declarations |
25
26#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
27
28pub mod constants;
29pub mod enums;
30pub mod ffi;
31pub mod handles;
32pub mod status;
33pub mod types;
34
35pub use constants::*;
36pub use enums::*;
37pub use ffi::*;
38pub use handles::*;
39pub use status::*;
40pub use types::*;