baracuda-tensorrt
Safe Rust wrappers for NVIDIA TensorRT — the high-performance inference runtime. Loads pre-built engine blobs and executes them on GPU.
Scope: runtime side only
TensorRT's builder (network construction, optimization passes, plan
serialization) is C++-only by NVIDIA's design — there's no stable C ABI
for it. Use trtexec or the Python bindings to produce engine blobs,
then load them through this crate at inference time.
The runtime side has a clean C ABI which this crate wraps:
Runtime: create with a typed Logger, deserialize an engine blob.Engine: inspect IO bindings (names, shapes, dtypes), serialize back to bytes (round-trip), query optimization profiles, query memory pool limits.ExecutionContext: create with allocation strategy (OnProfileChange/Static), set input shape, set tensor address, enqueue work viaenqueueV3.Logger: callback-based logger with severity filtering.
use ;
use ;
#
Pairs with baracuda-tensorrt-sys for the raw FFI surface.
Part of the baracuda workspace.
License
Dual MIT / Apache-2.0.