ort
Installation
SKILL.md
ONNX Runtime in Rust (ort 2.x)
Overview
ort is the Rust binding to ONNX Runtime. Use it when you need to run
ONNX-format models locally — text embedders, speech models, classifiers — with
hardware-accelerated execution providers (CoreML on Apple Silicon, CUDA on
Linux/Windows). The ort 2.x API changed significantly from 1.x; all patterns
here target ort = "=2.0.0-rc.12" (the version pinned by fastembed-rs).
Reference implementation: crates/trusty-common/src/embedder/fast_embedder.rs
Quick Start
1. Cargo.toml setup
Library crate (default-features = false avoids linking the bundled ORT runtime unnecessarily; consumers opt into ONNX via a feature):