Expand description
Hand-written FFI surface for libnvinfer (and libnvonnxparser when
the tensorrt-onnx feature is on).
TensorRT is a C++ API. We expose just the C-ABI shim functions we
need from a thin C++ glue layer. The functions declared extern "C"
here are intentionally empty when the tensorrt-link feature is
off — the linker is never asked to resolve them, and the safe
wrappers in builder.rs/engine.rs/runtime.rs/onnx.rs only
call them through a #[cfg(feature = "tensorrt-link")] gate.
The opaque pointer types (IBuilder, IBuilderConfig,
INetworkDefinition, ICudaEngine, IExecutionContext,
IRuntime, IPluginCreator) are zero-sized stand-ins for the
corresponding TensorRT C++ classes. They are only ever held as
*mut raw pointers; Send/Sync for the safe wrappers is granted
via newtypes (see engine.rs).
The C-ABI shim itself (a hand-written nvinfer_shim.cpp) is not
shipped in this Phase 8 skeleton — it lives behind the
tensorrt-link feature in a follow-up commit. Until then the FFI
signatures here document the surface area and let downstream code
type-check against a stable shape.
Structs§
- Dims
- IBuilder
- IBuilder
Config - ICuda
Engine - IExecution
Context - IHost
Memory - IInt8
Calibrator - INetwork
Definition - IOnnx
Parser - IPlugin
Creator - IPlugin
V3 - IRefitter
- IRuntime