1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2025 Au-Zone Technologies. All Rights Reserved.
//! Low-level FFI bindings for the TensorFlow Lite C API.
//!
//! This crate provides raw, unsafe bindings generated by `bindgen` with
//! `--dynamic-loading`. Symbols are resolved at runtime via `libloading`.
//!
//! **Most users should depend on `edgefirst-tflite` instead**, which
//! provides a safe, ergonomic API on top of these bindings.
//!
//! # Library Discovery
//!
//! Use [`discovery::discover`] to automatically find and load the `TFLite`
//! shared library, or [`discovery::load`] to load from a specific path.
//!
//! # Delegate Extensions
//!
//! The [`hal_ffi`] module provides function pointer structs for the
//! HAL Delegate DMA-BUF API (the standard, delegate-agnostic interface).
//!
//! The [`vx_ffi`] module provides function pointer structs for the
//! legacy `VxDelegate` DMA-BUF and `CameraAdaptor` APIs. Both are loaded
//! at runtime from the delegate shared library.
//!
//! The [`xnnpack_ffi`] module provides function pointer structs for the
//! XNNPACK built-in delegate API, loaded from the main `TFLite` library.
// Suppress all clippy/rustc/rustdoc warnings for bindgen-generated code.
pub use *;
/// Sentinel value for an unset `TfLiteBufferHandle` (`kTfLiteNullBufferHandle = -1`).
pub const kTfLiteNullBufferHandle: TfLiteBufferHandle = -1;