Index of Examples

Algorithms

Randomness

Sorting

Asynchronous

Async

Async and Blocking

Async Channels

Async Traits

RecipeCratesCategories
Async traitsasync-traitcat-asynchronous

Futures

Streams

RecipeCratesCategories
Streamsfuturescat-asynchronous

Tokio

RecipeCratesCategories
Basicstokiocat-asynchronous
Jointokiocat-asynchronous
Spawningtokiocat-asynchronous
IOtokiocat-asynchronous
Graceful shutdowntokio_graceful_shutdowncat-asynchronous

Authentication

Basic Authentication

RecipeCratesCategories
Perform a basic HTTP authenticationreqwestcat-authentication cat-network-programming

Command Line Interface

ANSI Terminal

Arguments

TUI

RecipeCratesCategories
Build complex TUIratatuicat-command-line-interface

User Interaction

Command Line Utilities

Filesystem

RecipeCratesCategories
lsdlsdcat-command-line-utilities
exaexacat-command-line-utilities
brootbrootcat-command-line-utilities
batbatcat-command-line-utilities
openopencat-command-line-utilities

Networking

RecipeCratesCategories
gpinggpingcat-command-line-utilities

Shells

RecipeCratesCategories
starshipstarshipcat-command-line-utilities
nushellnushellcat-command-line-utilities

Compression

tar

Concurrency

Concurrent Data Structures

Crossbeam

Data Parallelism

Explicit Threads

RecipeCratesCategories
Use spawn, joinstd[cat-concurrency]
Use scoped threadsstdcat-concurrency

Message Passing

Send

RecipeCratesCategories
Send and Sync traitsstdcat-concurrency

Shared State

Threadpool

Config

Configuration

RecipeCratesCategories
configconfigcat-config
confyconfycat-config

Environment Variables

RecipeCratesCategories
dotenvydotenvycat-config
std::envstdcat-config
envyenvycat-config

Cryptography

Encryption

RecipeCratesCategories
Salt and hash a password with PBKDF2ring data-encodingcat-cryptography

Hashing

Data Structures

Bitfield

Maps

Stack Allocated Arrays

RecipeCratesCategories
arrayvecarrayveccat-data-structures
smallvecsmallveccat-data-structures
tinyvectinyveccat-data-structures

UUID

RecipeCratesCategories
Generate and parse UUIDsuuidcat-data-structures

Database

Connection Pool

RecipeCratesCategories
Create a connection pooldeadpoolcat-database

NoSQL

RecipeCratesCategories
Connect to MongoDBmongodbcat-asynchronous cat-database cat-web-programming
Connect to Redisrediscat-database

Postgres

Query Builders Orms

RecipeCratesCategories
sqlxsqlxcat-database
dieseldieselcat-database
SeaORMsea-ormcat-database
toastytoastycat-database

SQLite

Date and Time

Duration

Parse

Time

RecipeCratesCategories
Use the time cratetimecat-date-and-time cat-value-formatting cat-parser-implementations cat-no-std

Cargo

Cargo

Crate Registries

RecipeCratesCategories
Crate registriescrates.iocat-development-tools

Package Layout

RecipeCratesCategories
Package layoutcargocat-development-tools

Documentation

Badges

RecipeCratesCategories
Badgesshield.iocat-development-tools

Documentation

mdBook

Formatting

Formatting

Installation

Install

Rustup

Other

Code Build

Code Verification

RecipeCratesCategories
Verify your Rust codekani{{hi:kani}}cat-development-tools

miri

Other

Versioning

Versioning

Development Tools: Build Utils

Build Utils

Development Tools: Cargo Plugins

Auditing

Building

Code Formatting Linting

Cross Compiling

Maintaining

Performance

Watching For Changes

RecipeCratesCategories
cargo watchcargo-watchcat-development-tools::cargo-plugins
cargo limitcargo-limitcat-development-tools::cargo-plugins

Writing

Development Tools: Debugging

Alternatives

Config Log

Diagnostic Functions

Log

Tracing

Encoding

Binary Encoders

Complex

CSV

Serde

RecipeCratesCategories
Serialize JSONserde_jsoncat-encoding
monostatemonostatecat-encoding
serde-ignoredserde-ignoredcat-encoding

Strings

Typecasts

RecipeCratesCategories
bytemuckbytemuckcat-encoding
zerocopyzerocopycat-encoding

Filesystem

cwd

RecipeCratesCategories
Get the current working directorystdcat-filesystem

Dir

File Watching

Ignore

Read-Write

Tempfile

User Directories

RecipeCratesCategories
dirsdirscat-filesystem
directoriesdirectoriescat-filesystem

Hardware Support

Processor

Mathematics

Additional Numeric Types

Complex Numbers

Linear Algebra

Statistics

Trigonometry

Memory Management

Global Static

RecipeCratesCategories
Declare lazily evaluated constantslazy_staticcat-caching cat-rust-patterns cat-memory-management

Lazy Initialization

RecipeCratesCategories
stdstdcat-memory-management
once_cellstd once_cellcat-memory-management
lazy_staticlazy_staticcat-memory-management

OS

External

Low Level System Calls

RecipeCratesCategories
Call libc, the C standard librarylibccat-os

Rust OS

Rust Patterns

Builder Pattern

RecipeCratesCategories
bonboncat-rust-patterns
derive_builderderive_buildercat-rust-patterns
typed-buildertyped-buildercat-rust-patterns

Design Patterns

Error Customization

RecipeCratesCategories
anyhowanyhowcat-rust-patterns
thisErrorthiserrorcat-rust-patterns
miettemiettecat-rust-patterns
color-eyrecolor-eyrecat-rust-patterns

Error Handling

Functional Programming

RecipeCratesCategories
Compose iteratorsitertoolscat-rust-patterns

Rust Idioms

RecipeCratesCategories
Rust idioms and patterns{{#crate }}cat-rust-patterns

Template Engine

Tera

RecipeCratesCategories
Create HTML files from a templateteracat-template-engine

Tinytemplate

Text Editors

IDEs

Text Processing

Regex

Regex2

RecipeCratesCategories
Longer Regex Exampleregexcat-text-processing

String Concat

RecipeCratesCategories
Compare string concatenation methodsstdcat-text-processing

String Parsing

Web Programming

Mime

Scraping

Url

Web Programming: HTTP Client

APIs

Download

HTTP Clients

RecipeCratesCategories
reqwestreqwestcat-web-programming::http-client
urequreqcat-web-programming::http-client
hyperhypercat-web-programming::http-client

Requests

Web Programming: HTTP Server

actix

RecipeCratesCategories
Create a web server with Actix Webactix-webcat-web-programming cat-web-programming::http-server

axum

RecipeCratesCategories
Create a web server with axumaxumcat-web-programming cat-web-programming::http-server

Batteries-Included Frameworks

RecipeCratesCategories
locoloco_rscat-web-programming::http-server
Rust on NailsRust on Nailscat-web-programming::http-server

CORS

RecipeCratesCategories
Implement CORStower tower-httpcat-web-programming

GraphQL

RecipeCratesCategories
Create a GraphQL endpointasync-graphqlcat-web-programming::http-server

gRPC

RecipeCratesCategories
Implement gRPCtoniccat-web-programming::http-server

hyper

RecipeCratesCategories
Implement an HTTP API with hyperhypercat-web-programming::http-server

Middleware

Other Frameworks

Static Website Generators

Contributing

API Documentation

Development Editing

Dev Container Docker

Dev Environment Setup

Optional Preprocessors

Publication

Repo Structure

Topics of Interest

Crates

Language

Attributes

Closures

Control Flow

Enums

Functions

Generics

Iterators

Lifetimes

Macros

Main

Match

Modules

Ownership Borrowing

Rust Install

Simple Data Types

Slices

Structs

Traits

Trait Objects

Variables and Constants

Blogs Podcasts Meetups

Books

Companies

Example Code

Learning

Rust Cheatsheets

Standard Library

AsRef

RecipeCrates
AsRef and &Tstd

Cow

Derive

Hashmaps

RecipeCrates
Hashmapsstd

Option

Result

RecipeCrates
Resultstd

Smart Pointers

RecipeCrates
Boxstd
Rcstd
RefCellstd

Strings

Vectors

RecipeCrates
Vecstd