RAVE
RAVE is a Rust-native, GPU-resident AI video engine with a bounded decode -> preprocess -> inference -> encode pipeline.
Workspace Layout
rave/
├── crates/
│ ├── rave-core/
│ ├── rave-cuda/
│ ├── rave-tensorrt/
│ ├── rave-nvcodec/
│ ├── rave-ffmpeg/
│ └── rave-pipeline/
├── rave-cli/
├── examples/
└── Cargo.toml
Build
Test
CLI Quickstart
# Human-readable probe
# Structured probe JSON
# Probe all devices
# Human-readable benchmark summary
# Structured benchmark JSON on stdout (+ file output)
# Progress (auto prints in TTY; explicit JSONL progress to stderr)
# Device inventory
CLI stdout/stderr + JSON contract (single source of truth):
stdout:- default mode (no
--json): human-readable command summary only --jsonmode: exactly one final JSON object only
- default mode (no
stderr:- progress stream only when
--progress human|jsonlor--jsonlis set - warnings/logging/errors (never mixed into
stdoutJSON mode output)
- progress stream only when
- Every CLI JSON object includes
"schema_version": 1in current releases. - Success payloads include
"ok": true; failures include"ok": falseand"error": "<message>". - Stability promise for parsers:
- within a fixed
schema_version, existing field names/types and channel placement (stdoutfinal payload,stderrprogress) remain stable - additive fields may be introduced
- breaking schema or channel-routing changes require incrementing
schema_version
- within a fixed
Progress JSONL contract (--progress jsonl or --jsonl):
- Stream:
stderronly (stdout remains human summary or final--jsonpayload). - Cadence: at most 1 line/sec while frame counters change, plus one final line with
final=true. - Units:
elapsed_msis wall-clock milliseconds; frame counters are cumulative counts. - Schema:
- Example lines:
WSL2 + CUDA + ONNX Runtime TensorRT EP
RAVE can run under WSL2 with NVIDIA GPU acceleration. ONNX Runtime is linked statically in this build, and TensorRT EP provider plugins are loaded dynamically. TensorRT EP requires the provider bridge symbol Provider_GetHost from libonnxruntime_providers_shared.so.
RAVE now preloads that bridge (RTLD_GLOBAL) before TensorRT EP registration, then:
- uses TensorRT EP when registration succeeds
- falls back to CUDA EP with a clear warning when TensorRT EP cannot be loaded
Required system libraries (WSL)
- NVIDIA WSL driver libs must be visible (typically
/usr/lib/wsl/lib). - CUDA 12 user-space libs must be resolvable (for example
libcudart.so.12,libcublas.so.12). - TensorRT 10 + parser + cuDNN 9 libs must be resolvable (
libnvinfer.so.10,libnvonnxparser.so.10,libcudnn.so.9).
Prefer persistent linker config (ldconfig) over ad-hoc shell exports.
Runtime provider control
Use RAVE_ORT_TENSORRT:
auto(default): try TensorRT EP, then fallback to CUDA EP on failureon/trt-only: require TensorRT EP (initialization fails if unavailable)off/cuda-only: skip TensorRT EP and use CUDA EP directly
Verify linkage and startup
D=""
LD_PRELOAD="/libonnxruntime_providers_shared.so"
|
Expected startup logs:
ORT execution provider selected provider=TensorrtExecutionProvider, or- warning about TensorRT EP registration failure followed by
provider=CUDAExecutionProvider
Docs
Examples
Prelude
rave::prelude re-exports common types and pipeline entry types:
GpuTexture,FrameEnvelope,PixelFormatPipelineConfig,UpscalePipelineEngineError,Result