The state of ML in Rust, as of
Rust now carries real ML products; the gaps are tracking, tabular parity and mobile.
Rust is a sound choice for inference, retrieval, speech, documents, video and numerical work shipped on one machine: pure-Rust engines exist for LLM and ONNX inference, tokenizing, full-text and vector search, FFT and linear algebra. It is weaker where teams need XGBoost parity, maintained multi-object tracking, a reinforcement-learning trainer, or Rust-native phone inference. Python stays useful for checkpoint conversion and quantization, ONNX export, tokenizer extraction and plotting, but none of that has to sit in your serving path. Treat ONNX Runtime, libtorch, llama.cpp and MKL as accelerators you call, not as Rust work.
Written by AI, not checked by a person. AI models read every project in the catalogue, wrote this report, and audited it against catalogue data. They never saw stars, downloads or tiers. AI can still get things wrong. Our code draws every chart. Report a wrong call.
How each job stands
| Job | Rust today | Python | Where it stands | Key tools |
|---|---|---|---|---|
| Run and serve models | Usable, with limits | For some steps | Quantized LLM inference and OpenAI-compatible serving work: mistralrs builds pure Rust by default, blazr, candle-vllm and furnace serve OpenAI routes, tract and oxionnx cover ONNX. All are early releases with thin model coverage. | |
| Build LLM apps and agents | Ready | For some steps | Hosted-API clients, MCP and schema-constrained output are shipping grade: rmcp is the official MCP SDK, async-openai and liter-llm cover providers, rstructor enforces schemas. Agent frameworks are early releases that churn. | Build with: rig, swiftide, rmcp, async-openai, liter-llm, rust-genai, yoagent, rstructor, langchain-rust, graphrag-rs |
| Train models | Usable, with limits | For some steps | Single-GPU training and LoRA fine-tuning work with burn, candle and oxidizr. rumus adds FSDP plus tensor and pipeline parallel paths on WebGPU; oxidizr stops at NCCL data parallelism. No maintained RL trainer exists. | Ready to run: oxidizr |
| Speech and audio | Usable, with limits | For some steps | ASR, TTS, VAD, diarization and audio decode all have working crates: earshot and sonora are pure Rust, parakeet-rs and transcribe-rs route through ONNX Runtime, sherpa-onnx wraps C. Model and format coverage are the limits. | Ready to run: minutes Build with: voxr, earshot, sonora, any-tts, xn-ptts, parakeet-rs, transcribe-rs, silero, sherpa-onnx (wrapper), scribble (wrapper), pyannote-rs (wrapper) |
| Text, embeddings and search | Ready | For some steps | Tokenizers, embeddings, vector stores and full-text search are covered: tantivy for BM25, qdrant for scale, tokenizers for exact model tokenization. Most embedding and reranking paths still call ONNX Runtime. | Ready to run: qdrant, meilisearch Build with: tantivy, tokenizers, model2vec-rs, kitoken, lindera, seekstorm, hnswlib-rs, jieba-rs, fastembed-rs, splintr |
| Images and vision | Usable, with limits | For some steps | Decode and transform are pure Rust in kornia-rs and imageproc; candle runs Stable Diffusion and aha runs vision and OCR on Candle. Detection and segmentation mostly call ONNX Runtime. No maintained multi-object tracker exists. | Ready to run: koharu Build with: kornia-rs, imageproc, candle, kornia-slam, aha, visioncortex, rust-cv-convert, usls, opencv-rust, inference (wrapper), diffusion-rs (wrapper) |
| Video | Too early | For some steps | vidr covers decode, encode, container IO and model-on-frame upscaling, with containr and rav1r for muxing and AV1. An early release from a lone maintainer, NVIDIA-tested, without VA-API and without H.264 above Baseline. | Ready to run: vidr |
| Documents and OCR | Usable, with limits | For some steps | OCR, PDF extraction and layout are covered: ocrs and franken_ocr run in Rust, pdf-inspector and oxidizePdf are pure Rust, edgeparse handles reading order. Broadest format coverage wraps Tesseract, PDFium and ONNX Runtime. | Ready to run: oxidizePdf Build with: ocrs, franken_ocr, pdf-inspector, edgeparse, pdf_oxide, rust-paddle-ocr, rusto-rs (wrapper), oar-ocr (wrapper), docling (wrapper), xberg (wrapper), kreuzberg-lts (wrapper) |
| Tabular data and classic ML | Usable, with limits | For some steps | Boosted trees, forests, SVMs, clustering, forecasting and AutoML exist in pure Rust through treeboost, linfa, smartcore and augurs. XGBoost and LightGBM parity is unavailable and model-agnostic explanation is thin. | Build with: treeboost, linfa, smartcore, augurs, perpetual, anofox-regression, rust-automl, hdbscan, petal-clustering, leiden-rs, aprender From ML Rust, who run this catalogue: treeboost |
| Math and science | Usable, with limits | For some steps | Arrays, dense linear algebra, FFT, sparse matrices, statistics, optimization and ODE solvers are covered in pure Rust by ndarray, faer, rustfft, statrs and differential-equations. SciPy breadth is thinner in places; plotting still calls matplotlib. | |
| Tensors and GPU compute | Usable, with limits | Not needed | Tensor math runs on GPU from Rust: burn ships CUDA, Metal, WebGPU, ROCm and Vulkan, candle adds CUDA and Metal, cubecl compiles kernels across vendors, numr adds NumPy-role tensors. Autodiff works; custom kernels and vendor coverage are uneven. | |
| Datasets and model formats | Ready | For some steps | Model and dataset IO is strong: safetensors, gguf, arrow-rs, polars, datafusion and hf-hub are Rust. HDF5 has pure-Rust and wrapped options; legacy PyTorch checkpoint conversion still needs Python. | Build with: safetensors, arrow-rs, polars, datafusion, gguf, hf-hub, lance, vortex, ndarray-npy, zarrs, hdf5-pure, delta-rs From ML Rust, who run this catalogue: compressr |
Crates to use now
-
mistralrs: Local LLM inference behind a Rust SDK
Default features build in pure Rust, loads GGUF and multimodal models, and exposes tools, structured output and an MCP client behind a single SDK.
-
tantivy: Full-text search library with BM25
BM25, facets, fast fields and mmap in a library other Rust search engines build on; you write the server layer.
-
qdrant: Vector search server at production scale
Rust server with sharding, replication, quantization and sparse plus multi-vector search, reached over REST and gRPC.
-
rmcp: Build MCP servers and clients
Official MCP SDK with tools, resources, transports and OAuth; other Rust MCP crates sit on top of it.
-
liter-llm: Call hosted model APIs from Rust
A single async client over many providers with tools, streaming and structured output, so provider churn stays out of your app.
-
earshot: Streaming voice activity detection
Pure-Rust streaming VAD over short frames, returns a voice score, builds without ONNX Runtime and can run no_std.
-
rustfft: FFT of any size in pure Rust
SIMD-accelerated transforms of any size including primes; the FFT underneath ndarray and other crates.
-
faer: Dense linear algebra and decompositions
Dense linear algebra with decompositions and a high-level API, written in pure Rust so no LAPACK link is needed.
-
ndarray: N-dimensional arrays for numeric code
The array container most Rust ML crates share; slicing, views, Zip and optional BLAS keep numeric code portable.
-
safetensors: Read and write model weights
Zero-copy reads and safe writes for model weights; the interchange format Rust trainers and loaders already speak.
-
hf-hub: Fetch models and datasets from the Hub
Async and blocking client for Hub models, datasets and files, native and wasm; keeps download and cache logic out of your code.
-
tokenizers: Exact tokenization for model families
Reference BPE, WordPiece and Unigram pipeline with tokenizer.json load and save; matches the main model families.
Crates to watch
-
oxionnx: Pure-Rust ONNX inference engine
No C or C++ in the build, and real detection models run. Still needs a tokenizer and sampler bolted on, and browser WebGPU is unwired.
-
treeboost: Gradient-boosted trees for tabular data
Boosted trees and forests with an AutoML mode and SIMD plus GPU backends. No changelog, unstable API and a small team behind it.
-
oxidizr: Config-driven language-model training
Runs the training loop with checkpoints, metrics and resume on a local machine. No FSDP, ZeRO, tensor or pipeline parallelism.
-
vidr: GPU video decode, encode and upscaling
Decode, encode, muxing and upscaling in one workspace with frames kept on the GPU. Early release, NVIDIA-tested, no VA-API, H.264 Baseline only.
-
franken_ocr: Pure-Rust CPU OCR for documents
Runs document and formula OCR models with Markdown and box output and no FFI. Lone maintainer, CPU only, not a general model runtime.
-
model2vec-rs: Static text embeddings, WASM included
Static embeddings with int8 quantization and a WASM build, no ONNX Runtime. No training or distillation, and no GPU path.
What you can build today
-
Private document Q&A over your own files
Use: mistralrs, fastembed-rs, qdrant, swiftide
mistralrs generates, fastembed-rs embeds locally, qdrant stores and searches, swiftide wires loaders, chunkers and retrieval into one pipeline.
Watch out: Both the agent and RAG layers are early releases, and the embedding path pulls in ONNX Runtime.
-
Local meeting transcription with speaker labels
Use: parakeet-rs, earshot, voxr
voxr decodes and resamples input, earshot gates speech, parakeet-rs transcribes and diarizes on your own hardware.
Watch out: parakeet-rs caps speaker count and pass length, and ONNX Runtime limits it to a process-wide environment.
-
Search API over your own document corpus
Use: tantivy, tokenizers, fastembed-rs, qdrant-client
tantivy scores BM25, tokenizers matches model tokenization, fastembed-rs embeds, qdrant-client queries the store over gRPC.
Watch out: Hybrid ranking and rerank logic are yours to write; the embedding step needs ONNX Runtime.
-
Fine-tune and serve a small model on local hardware
Use: burn, oxidizr, safetensors
oxidizr runs the YAML training loop with checkpoints and resume, burn supplies kernels and autodiff, safetensors carries weights.
Watch out: This stack stays on a single machine with NCCL data parallelism; oxidizr has no FSDP, tensor or pipeline parallelism.
-
OCR and PDF extraction for scanned documents
Use: ocrs, pdf-inspector, edgeparse, oxidizePdf
pdf-inspector separates text from scans, ocrs reads images, edgeparse orders columns and tables, oxidizePdf chunks for retrieval.
Watch out: OCR models need fetching and release-mode builds; no learned layout unless you add extra models.
Gaps Rust has filled
-
Quantized LLM inference plus an OpenAI-compatible server
Teams can serve a GGUF model without PyTorch; checkpoint conversion and quantization still use Python first.
Use blazr, llama-gguf, candle-vllm, furnace.
-
ONNX inference with no C or C++ runtime
Exported models run in Rust on CPU, Metal, CUDA or WASM; operator coverage and tokenizer or sampler wiring are the cost.
-
Tokenization that matches the main model families
Exact ids without a Python round trip; validate against reference output for the families you depend on.
Use tokenizers, tiktoken-rs, kitoken.
-
Full-text and vector search over your own data
Both halves of hybrid search exist in Rust; reranking still runs through wrapped ONNX Runtime.
-
Streaming voice activity detection without a native runtime
Gate microphones in pure Rust; learned VAD through ONNX Runtime remains an option when accuracy demands it.
-
Numerical core: arrays, FFT and dense linear algebra
Most SciPy work on a single machine translates; plotting and reference validation stay in Python.
-
Model and dataset IO for weights and columnar data
Read and write the formats trainers and loaders use; legacy PyTorch checkpoints still need conversion tooling.
Use safetensors, gguf, arrow-rs.
Gaps still open
-
XGBoost and LightGBM parity for tabular models
Teams with existing boosted-tree pipelines cannot port them and compare like for like in Rust.
What teams do today: Train with treeboost or perpetual and export to XGBoost or ONNX, or keep training in Python.
-
Rust-native inference on phones
Mobile teams fall back to llama.cpp, whisper.cpp or ONNX Runtime bindings, so the build is not Rust end to end.
What teams do today: xybrid ships Android and iOS presets but wraps native engines; needle-rs covers tool-calling models only and leaves NPU work to Cactus.
-
Maintained multi-object tracking across video frames
Video analytics teams cannot keep detection-to-track state on a maintained Rust crate; the only tracker row is unmaintained.
What teams do today: similari has Kalman, SORT, Batch SORT and VisualSORT but is unmaintained; teams write IoU and Hungarian assignment on ndarray or use Python ByteTrack.
-
A maintained reinforcement-learning trainer
RL teams get environments but no maintained learner; the older Rust RL crates are unmaintained.
What teams do today: Use bevy_rl for environments and write the learner on burn or candle, or keep training in Python.
-
VA-API and H.264 High profile in Rust video
Linux teams without NVIDIA cannot decode or encode common camera and screen streams through a Rust path.
What teams do today: vidr covers NVDEC, NVENC and Vulkan Video plus Baseline H.264 and AV1 on CPU; otherwise transcode with FFmpeg or a Python pipeline.
What the catalogue measures
- No native code found
- Native build tool
- Some native code
- Wraps a native engine
| Name | Bar | Counts |
|---|---|---|
| Run and serve models | 23 no native code found, 2 native build tool, 29 some native code, 21 wraps a native engine | |
| Build LLM apps and agents | 65 no native code found, 55 some native code, 6 wraps a native engine | |
| Train models | 22 no native code found, 1 native build tool, 14 some native code, 3 wraps a native engine | |
| Speech and audio | 12 no native code found, 1 native build tool, 17 some native code, 8 wraps a native engine | |
| Text, embeddings and search | 56 no native code found, 2 native build tool, 39 some native code, 8 wraps a native engine | |
| Images and vision | 6 no native code found, 1 native build tool, 7 some native code, 3 wraps a native engine | |
| Video | 1 no native code found, 2 some native code | |
| Documents and OCR | 5 no native code found, 1 native build tool, 3 some native code, 7 wraps a native engine | |
| Tabular data and classic ML | 23 no native code found, 7 some native code | |
| Math and science | 17 no native code found, 1 native build tool, 9 some native code | |
| Tensors and GPU compute | 7 no native code found, 9 some native code | |
| Datasets and model formats | 16 no native code found, 14 some native code |
| Name | Bar | Counts |
|---|---|---|
| CUDA | 80 projects | |
| WebGPU | 31 projects | |
| Metal | 44 projects | |
| ROCm | 14 projects | |
| Vulkan | 19 projects |
- Last 90 days
- Last year
- Older
| Name | Bar | Counts |
|---|---|---|
| Run and serve models | 50 last 90 days, 18 last year, 16 older | |
| Build LLM apps and agents | 92 last 90 days, 32 last year, 22 older | |
| Train models | 12 last 90 days, 5 last year, 24 older | |
| Speech and audio | 17 last 90 days, 14 last year, 9 older | |
| Text, embeddings and search | 55 last 90 days, 23 last year, 42 older | |
| Images and vision | 8 last 90 days, 4 last year, 7 older | |
| Video | 3 last 90 days | |
| Documents and OCR | 11 last 90 days, 2 last year, 3 older | |
| Tabular data and classic ML | 11 last 90 days, 5 last year, 16 older | |
| Math and science | 12 last 90 days, 12 last year, 3 older | |
| Tensors and GPU compute | 8 last 90 days, 9 older | |
| Datasets and model formats | 21 last 90 days, 9 last year, 4 older |