RRust By Example

Rust Engineering Guides

These long-form guides are designed for real search intent: concrete problems, runnable examples, and implementation tradeoffs. Use them as entry points, then drill into detailed example and error pages.

538 actionable guides published across 27 topics.

Ai Inference

Ai Inference practical guides.

View all 20

Rust AI Inference Anti-Patterns

Common mistakes and anti-patterns when building AI inference services in Rust. Learn what to avoid: blocking the async runtime, cloning tensors unnecessarily, missing backpressure, and more.

High-intent search: "rust ai inference mistakes anti-patterns"

Rust AI Inference Architecture

Design patterns and system architecture for building scalable AI inference services in Rust. Covers model serving, request routing, batching pipelines, and multi-model orchestration.

High-intent search: "rust ai inference architecture"

Rust AI Inference Benchmarking

How to benchmark AI inference performance in Rust using Criterion. Measure throughput, latency distribution, batch efficiency, and compare implementations with reproducible results.

High-intent search: "rust ai inference benchmark criterion"

Rust AI Inference Best Practices

Production-ready best practices for building AI inference servers in Rust. Learn how to optimize throughput, reduce latency, and deploy reliable ML model serving with Rust.

High-intent search: "rust ai inference best practices"

Rust AI Inference Debug Checklist

Step-by-step debug checklist for AI inference issues in Rust. Use this checklist when your inference server is slow, crashing, or producing incorrect results.

High-intent search: "rust ai inference debug checklist"

Rust AI Inference Decision Matrix

How to choose the right AI inference framework for your Rust project. Compare candle, ort (ONNX Runtime), tch-rs (LibTorch), tract, and custom implementations across key dimensions.

High-intent search: "rust ai inference framework comparison"

Async

Task orchestration, cancellation, and runtime behavior.

View all 20

Axum

API handler architecture and state management.

View all 20

CLI

Command-line UX, parsing, and operational behavior.

View all 20

Collections

HashMap, BTreeMap, and Vec selection tradeoffs.

View all 20

Concurrency

Shared state, synchronization, and thread-safe design.

View all 20

Deployment

Rollout strategy, reliability, and observability.

View all 20

Error Handling

Result-based architecture and explicit failure paths.

View all 20

FFI

C boundary correctness and ownership contracts.

View all 20

File I/O

Read/write resilience and streaming choices.

View all 20

Generics

Type parameter design and compile-time constraints.

View all 20

Iterators

Iterator pipelines, laziness, and ownership interactions.

View all 20

Lifetimes

Reference lifetime boundaries and annotation strategies.

View all 20

Llm Rust

Llm Rust practical guides.

View all 18

Building LLM Applications with Rust

Comprehensive guide to building Large Language Model (LLM) applications in Rust. Covers OpenAI API integration, local model inference, prompt engineering, and streaming responses.

High-intent search: "rust llm large language model"

LLM API Gateway in Rust

Build a production LLM API gateway in Rust with Axum: multi-provider routing, rate limiting, cost tracking, request logging, and streaming proxy for OpenAI and Anthropic.

High-intent search: "rust llm api gateway openai proxy"

LLM Rust Anti-Patterns

Anti-patterns to avoid when building LLM applications in Rust: blocking on streaming, over-prompting, synchronous API calls in async context, and missing error boundaries.

High-intent search: "rust llm anti-patterns mistakes avoid"

LLM Rust Benchmarking

Benchmark LLM application performance in Rust: measure TTFT, throughput, cache hit rates, and compare provider latency distributions using Criterion and custom instrumentation.

High-intent search: "rust llm benchmark latency throughput"

LLM Rust Decision Matrix

How to choose the right LLM integration approach for Rust projects: OpenAI API vs Anthropic vs local models, streaming vs batch, managed vs self-hosted inference.

High-intent search: "rust llm comparison openai anthropic local"

LLM Rust Interview Q&A

Top interview questions and answers about building LLM applications in Rust. Covers streaming APIs, prompt design, context management, rate limiting, and system architecture for AI engineers.

High-intent search: "rust llm interview questions answers"

Macros

Macro readability, ergonomics, and maintenance.

View all 20

Modules

Public API boundaries and codebase structure.

View all 20

Ownership

Borrow, move, and clone decisions for reliable Rust APIs.

View all 20

Patterns

State modeling and expressive pattern matching.

View all 20

Performance

Allocation, latency, and throughput tuning workflow.

View all 20

Serde

Serialization schema stability and compatibility.

View all 20

Smart Pointers

Rc, Arc, RefCell, and interior mutability choices.

View all 20

SQLx

Query safety, transactions, and database reliability.

View all 20

Testing

Unit, integration, and regression testing workflows.

View all 20

Tokio

Runtime tuning, scheduling behavior, and production patterns.

View all 20

Traits

Trait bounds, object safety, and polymorphic design.

View all 20

Unsafe Rust

Unsafe block containment and invariants.

View all 20

WebAssembly

Wasm boundary design and binary optimization.

View all 20

Publishing standard for every new guide

  • Start from a clear problem statement users actually search for.
  • Include one runnable example and one counterexample.
  • End with at least 3 internal links to errors/examples for deeper reading.