Index of Examples
Algorithms
Randomness
FIXME
Sorting
Recipe | Crates | Categories |
---|---|---|
Sort a Vector of Integers | ||
Sort a Vector of Floats | ||
Sort a Vector of Structs |
Asynchronous
Async
Recipe | Crates | Categories |
---|---|---|
Basic Example | ||
Differences with Other Languages | ||
Which Crate Provides What? | ||
Async Runtimes |
Async and Blocking
Async Channels
Async Traits
Recipe | Crates | Categories |
---|---|---|
Async Traits |
Async Utilities
Recipe | Crates | Categories |
---|---|---|
Visualize the Structure of Asynchronous Tasks and Their Dependencies |
Futures
Recipe | Crates | Categories |
---|---|---|
Selecting Futures | ||
Joining Futures | ||
Map, then , either , flatten | ||
futures-util | [![futures-util][c-futures-util-badge]][c-futures-util] |
FIXME
Streams
Recipe | Crates | Categories |
---|---|---|
Streams |
FIXME
Tokio
Recipe | Crates | Categories |
---|---|---|
Basics | ||
Join | ||
Spawning | ||
IO | ||
Graceful Shutdown |
FIXME
Authentication
Basic Authentication
Recipe | Crates | Categories |
---|---|---|
Perform a Basic HTTP Authentication |
Caching
LRU
Recipe | Crates | Categories |
---|---|---|
Use a Least Recently Used (LRU) Cache | ||
cached | ||
moka |
FIXME
Command Line Interface
ANSI Terminal
Recipe | Crates | Categories |
---|---|---|
ANSI Terminal | ||
Print Colored Text to the Terminal | ||
Print Bold Text to the Terminal | ||
Print Bold and Colored Text to the Terminal | ||
Manipulate the Cursor, Style the Output, Handle Input Events | ||
ansiterm | ||
anstream | ||
anstyle | ||
console | ||
owo-colors | ||
stylish | ||
termcolor | ||
yansi | ||
termion | ||
nu-ansi-term | [![nu-ansi-term][c-nu-ansi-term-badge]][c-nu-ansi-term] | |
colored |
FIXME
Argument Parsing
FIXME
TUI
Recipe | Crates | Categories |
---|---|---|
Build Complex TUI |
User Interaction
Recipe | Crates | Categories |
---|---|---|
Ask for Confirmation, Selection, Text Input | ||
Display Progress Bars and Spinners |
Command Line Utilities
Filesystem CLI
FIXME
Networking CLI
Recipe | Crates | Categories |
---|---|---|
gping |
Shells
Compression
flate2
Recipe | Crates | Categories |
---|---|---|
Compress then Decompress |
tar
Recipe | Crates | Categories |
---|---|---|
Compress a Directory into a Tarball | ||
Decompress a Tarball | ||
Decompress a Tarball While Removing a Prefix from the Paths |
Concurrency
Atomics
Recipe | Crates | Categories |
---|---|---|
Standard Atomic Types | ||
arc-swap |
Concurrent Data Structures
Recipe | Crates | Categories |
---|---|---|
Bounded Multi-producer Multi-consumer Queue | ||
dashmap | ||
flurry | ||
papaya |
crossbeam
Recipe | Crates | Categories |
---|---|---|
Spawn a Short-lived Thread | ||
Create a Parallel Pipeline | ||
Pass Data Between Two Threads |
Data Parallelism
Explicit Threads
Recipe | Crates | Categories |
---|---|---|
Use spawn, join | [ | |
Use scoped threads |
Message Passing
Recipe | Crates | Categories |
---|---|---|
Multiple Producers, Single Consumer | ||
crossbeam-channel | ||
flume |
Send Sync
Recipe | Crates | Categories |
---|---|---|
Existing Implementations of Send and Sync | ||
Implementing Send and Sync | ||
Send and Sync Traits |
Shared State
Recipe | Crates | Categories |
---|---|---|
Maintain a Global Mutable State | ||
Mutexes | ||
parking_lot |
Threadpool
Recipe | Crates | Categories |
---|---|---|
Calculate the SHA256 of ISO Files Concurrently | ||
Draw a Fractal, Dispatching Work to a Thread Pool |
Config
Configuration
FIXME
Environment Variables
FIXME
Cryptography
AEAD
Recipe | Crates | Categories |
---|---|---|
aes-gcm-siv | ||
aes-gcm | ||
ChaCha20Poly1305 |
Certificates
Recipe | Crates | Categories |
---|---|---|
DER | ||
pem-rfc7468 | ||
pkcs8 | ||
x509-cert |
FIXME
Cryptography Utilities
Encryption
Recipe | Crates | Categories |
---|---|---|
Use the RSA Algorithm |
FIXME
Hashing
Recipe | Crates | Categories |
---|---|---|
Calculate the SHA-256 Digest of a File | ||
sha2 | ||
sha1 | ||
md-5 | ||
blake3 |
HMAC
Recipe | Crates | Categories |
---|---|---|
Sign and Verify a Message with a HMAC Digest |
Password Hashing
Recipe | Crates | Categories |
---|---|---|
Hash a Password, then Verify a Password Against the Hash | ||
scrypt | ||
bcrypt | ||
Salt and Hash a Password with PBKDF2 |
FIXME
Signature
Recipe | Crates | Categories |
---|---|---|
ed25519 | ||
ed25519-dalek | ||
ecdsa | ||
dsa |
FIXME
TLS
Recipe | Crates | Categories |
---|---|---|
rustls | ||
native-tls |
Data Structures
Binaryheap
Recipe | Crates | Categories |
---|---|---|
priority-queue |
FIXME
Bitfield
Recipe | Crates | Categories |
---|---|---|
Define and Operate on a Type Represented as a Bitfield | ||
flagset | ||
bitvec |
Btrees
Recipe | Crates | Categories |
---|---|---|
BTreeMap<K, V> | ||
BTreeSet<T> |
Heapless
Recipe | Crates | Categories |
---|---|---|
Heapless |
LinkedList
Recipe | Crates | Categories |
---|---|---|
Stored Data in a Linked List |
Maps
Recipe | Crates | Categories |
---|---|---|
Store Data in an Insertion-ordered Map | ||
Store Data in a multimap | ||
Store Collections of Objects that Need Stable, Safe References |
Stack Allocated Arrays
Stack and Queue
Recipe | Crates | Categories |
---|---|---|
Implement a Queue Using VecDeque | ||
Implement a Stack Using Vec |
FIXME
UUID
Recipe | Crates | Categories |
---|---|---|
Generate and Parse UUIDs |
Database
AMQP
Recipe | Crates | Categories |
---|---|---|
Connect to RabbitMQ with lapin |
Connection Pool
Recipe | Crates | Categories |
---|---|---|
Create a Connection Pool |
Key Value Stores
MSSQL
Recipe | Crates | Categories |
---|---|---|
tiberius |
NoSQL
Recipe | Crates | Categories |
---|---|---|
Connect to MongoDB | ||
Connect to Redis | ||
Connect to Cassandra Using cassandra_protocol | ||
Connect to Cassandra Using cdrs_tokio |
Oracle
Recipe | Crates | Categories |
---|---|---|
diesel_oci | ||
Connect to an Oracle Database with oracle | ||
sibyl |
Postgres
Recipe | Crates | Categories |
---|---|---|
Create Tables in a Postgres Database | ||
Insert and Query Data | ||
Aggregate Data | ||
Connect to and Query Postgres Asynchronously with tokio-postgres | ||
cornucopia for Postgres | cornucopia-rs⮳ |
Query Builders ORMs
Search
Recipe | Crates | Categories |
---|---|---|
Connect to Elasticsearch | ||
Add a Full-text Search Engine to a Static Website |
SQLite
Recipe | Crates | Categories |
---|---|---|
Create a SQLite Database | ||
Insert and Select Data | ||
Using Transactions |
Database Implementations
Databases
Rust Search Engines
Recipe | Crates | Categories |
---|---|---|
meilisearch | ||
tantivy |
Date and Time
Duration
Recipe | Crates | Categories |
---|---|---|
Measure the Elapsed Time Between Two Code Sections | ||
Perform Checked Date and Time Calculations | ||
Convert a Local Time to Another Timezone |
Parse
Recipe | Crates | Categories |
---|---|---|
Examine the Date and Time | ||
Convert Date to UNIX Timestamp and Vice Versa | ||
Display Formatted Date and Time | ||
Parse a String into a DateTime Struct | ||
humantime |
Time Crate
Recipe | Crates | Categories |
---|---|---|
Use the time Crate |
Cargo
Cargo
Recipe | Crates | Categories |
---|---|---|
Basic cargo Usage | ||
Cargo.toml and Lock Files |
Crate Registries
Recipe | Crates | Categories |
---|---|---|
Crate Registries | crates.io⮳ | |
Access crates.io APIs with crates_io |
Package Layout
Recipe | Crates | Categories |
---|---|---|
Package Layout |
Compilation
Faster Linking
Recipe | Crates | Categories |
---|---|---|
Optimize Linking | lld ⮳zld ⮳ | |
Alternative - mold Linker | mold ⮳ |
FIXME
Reduce Compilation Duration
Recipe | Crates | Categories |
---|---|---|
Use Dynamic Linking | ||
Compile Incrementally | ||
Measure Build Times | ||
Optimize Compilation Levels | ||
Measure Build Times |
FIXME
Cross Compilation
Cross Compilation
Recipe | Crates | Categories |
---|---|---|
Cross-compile for Multiple Target OSes and Architectures | ||
Cross-compile with cargo |
Documentation
Badges
Documentation
Recipe | Crates | Categories |
---|---|---|
Document Your Code | ||
Create Module- or Crate-level Documentation | ||
Add Documentation to Function Arguments in Rust |
[review](https://github.com/john-cd/rust_howto/issues/917)
mdBook
[fix; titles](https://github.com/john-cd/rust_howto/issues/298)
Formatting
Formatting
Recipe | Crates | Categories |
---|---|---|
Format your Rust code with rustfmt | ||
Configure rustfmt | ||
Use Attributes to Skip Code Formatting in Your Code |
Installation
Install
Recipe | Crates | Categories |
---|---|---|
Build and Install a Rust Binary with cargo install | ||
Install a Rust Binary with cargo binstall |
Rustup
Recipe | Crates | Categories |
---|---|---|
Install and Manage Rust Toolchains with rustup |
Other
Code Build
Recipe | Crates | Categories |
---|---|---|
Save and run project-specific Commands with the just Command Runner | ||
Check Your Rust Code in the Background |
Code Verification
Recipe | Crates | Categories |
---|---|---|
Verify Your Rust Code with kani | ||
Concurrent Code Verification | ||
loom | ||
shuttle |
miri
Recipe | Crates | Categories |
---|---|---|
Install the miri Interpreter | ||
Detect Undefined Behavior with the miri Interpreter |
Other
Recipe | Crates | Categories |
---|---|---|
Search for Rust APIs | roogle | |
Deploy your Rust code on shuttle.rs | shuttle.rs | |
Minimize Rust Binary Sizes | ||
Generate Rust Code |
Transcompilation
Transpilers
Recipe | Crates | Categories |
---|---|---|
C to Rust Translation |
FIXME
Versioning
Versioning
Development Tools: Build Utils
autocfg
Recipe | Crates | Categories |
---|---|---|
autocfg |
FIXME
Build Cache
Recipe | Crates | Categories |
---|---|---|
Use sccache |
FIXME
Build Time Tooling
Recipe | Crates | Categories |
---|---|---|
Compile and Link Statically to a Bundled C Library | ||
Compile and Link Statically to a Bundled C++ Library | ||
Compile a C Library While Setting Custom Defines |
Development Tools: Cargo Plugins
Auditing
Building
Recipe | Crates | Categories |
---|---|---|
cargo make | ||
Use devx | ||
Make Rust a Better bash with xshell |
FIXME
Code Formatting Linting
Recipe | Crates | Categories |
---|---|---|
Format Your Code | ||
Lint Your Code | ||
Fix Compiler Warnings Automatically | ||
Format or Lint Your Code Before Committing it |
Code Writing
Recipe | Crates | Categories |
---|---|---|
Generate a Rust Project from a Template | ||
Quickly Open the crates.io or docs.rs Page for the Latest Version of a Crate |
Cross Compiling
Recipe | Crates | Categories |
---|---|---|
Cross-compile Using zig as the Linker |
Dependency Management
Recipe | Crates |
---|---|
Edit Cargo.toml | [![cargo-edit][c-cargo-edit-badge]][c-cargo-edit] |
Detect Dependencies that are Out of Date | [![cargo-outdated][c-cargo-outdated-badge]][c-cargo-outdated] |
Find Unused Dependencies | [![cargo-udeps][c-cargo-udeps-badge]][c-cargo-udeps][![cargo-machete][c-cargo-machete-badge]][c-cargo-machete] |
deps.rs | deps.rs ⮳ |
Rust Digger | rust-digger.code-maven.com ⮳ |
FIXME
Maintaining
FIXME review
Performance
Recipe | Crates | Categories |
---|---|---|
Configure your cargo project for Maximum Performance, Fast Compile Times or Minimal Binary Size | ||
cargo hakari |
Watching For Changes
Recipe | Crates | Categories |
---|---|---|
cargo watch | ||
cargo limit |
Development Tools: Debugging
Config Log
Recipe | Crates | Categories |
---|---|---|
Enable Log Levels per Module | ||
Use a Custom Environment Variable to Set Up Logging | ||
Include a Timestamp in Log Messages | ||
Log Messages to a Custom Location |
Debugging
Diagnostic Functions
Recipe | Crates | Categories |
---|---|---|
Get the Type Name of the Pointed-to Value |
Distributed Telemetry
Recipe | Crates | Categories |
---|---|---|
Jaeger | [![jaeger][c-jaeger-badge]][c-jaeger] | |
OpenObserve | [![openobserve][c-openobserve-badge]][c-openobserve] | |
Distributed Tracing with OpenTelemetry |
Log
Recipe | Crates | Categories |
---|---|---|
Log a Debug Message to the Console | ||
Log an Error Message to the Console | ||
Log to stdout Instead of stderr | ||
Log Messages with a Custom Logger | ||
Log to the Unix Syslog |
Tracing
Recipe | Crates | Categories |
---|---|---|
Initialize the Logger | ||
Enable Basic Tracing | ||
Combine Layers | ||
Configure a Custom Event Formatter | ||
Events | ||
Spans | ||
Add Tracing Spans to Functions | ||
See Also |
Tracing Alternatives
Recipe | Crates | Categories |
---|---|---|
log | ||
slog | ||
log4rs | ||
env_logger | ||
OpenTelemetry | OpenTelemetry Rust documentation⮳ | |
OpenObserve | OpenObserve⮳ |
Development Tools: Profiling
Assembly
Recipe | Crates | Categories |
---|---|---|
Inspect the Generated Assembly |
Benchmarking
Recipe | Crates | Categories |
---|---|---|
cargo flamegraph | ||
criterion | ||
divan | ||
hyperfine |
Memory Usage Analysis
Recipe | Crates | Categories |
---|---|---|
Profile Heap Memory with dhat | ||
Examine Memory with Debugging Tools | ||
Leak Detection | ||
Execution Time Measurement | ||
Use Tracing to Understand Allocation Patterns |
Development Tools: Testing
Assertions
Recipe | Crates | Categories |
---|---|---|
Emit a Custom Message | ||
Assert that a Value Matches a Pattern with assert_matches | ||
approx |
FIXME
Code Coverage
Recipe | Crates | Categories |
---|---|---|
Measure your code coverage | ||
Coverage Testing with grcov | ||
Measure your code Coverage with cargo_tarpaulin |
FIXME
Fuzzing
Recipe | Crates | Categories |
---|---|---|
afl | ||
cargo fuzz | [![cargo-fuzz][c-cargo-fuzz-badge]][c-cargo-fuzz] |
FIXME
Mocking
Recipe | Crates | Categories |
---|---|---|
Mock Structs with faux | ||
Mock with mockall |
FIXME
Property Based Testing
Recipe | Crates | Categories |
---|---|---|
proptest | ||
Test Data Generation with fake |
FIXME
Test Runners
Recipe | Crates | Categories |
---|---|---|
Test your code with cargo test | ||
Test your code Faster with cargo nextest |
FIXME
Testing
Recipe | Crates | Categories |
---|---|---|
Unit Testing | ||
Integration Testing | ||
Documentation Testing | ||
Snapshot Testing: Test Your Code Against Snapshots | ||
Asynchronous Testing |
FIXME
Encoding
Complex Encoding
Recipe | Crates | Categories |
---|---|---|
Serialize and Deserialize Unstructured JSON | ||
Deserialize a TOML Configuration File | ||
Read and Write Integers in Little-endian Byte Order |
CSV
No External Schema
Serde
Recipe | Crates | Categories |
---|---|---|
Serialization with serde | ||
(De)serialize JSON | ||
monostate | ||
Handle Unknown Fields When Deserializing, with serde-ignored |
String Encoding
Recipe | Crates | Categories |
---|---|---|
URL Encoding | ||
Encode a String as application/x-www-form-urlencoded | ||
Encode and Decode Hexadecimal | ||
Encode and Decode base64 |
Typecasts
Filesystem
Directories
Recipe | Crates | Categories |
---|---|---|
Get the Current Working Directory | ||
remove_dir_all |
Directory Traversal
FIXME
File Watching
Recipe | Crates | Categories |
---|---|---|
Watch Files or Directories and Execute a Function When They Change |
Read-Write
Recipe | Crates | Categories |
---|---|---|
Read Lines of Strings from a File | ||
Avoid Writing and Reading from the Same File | ||
Access a File Randomly Using a Memory Map |
FIXME
tempfile
Recipe | Crates | Categories |
---|---|---|
Create Temporary Files or Temporary Directories |
User Directories
Recipe | Crates | Categories |
---|---|---|
dirs | ||
directories |
FIXME
Hardware Support
Peripherals
FIXME
Processor
Recipe | Crates | Categories |
---|---|---|
Check the Number of Logical cpu Cores | ||
SIMD (Single Instruction, Multiple Data) Operations | [![std::arch][c-std::arch-badge]][c-std::arch] |
FIXME
Mathematics
Additional Numeric Types
Recipe | Crates | Categories |
---|---|---|
Abstract over Different Number Types | ||
Use Big Integers | ||
Use Big Decimals | ||
Sort Floats | ||
num-bigint | ||
num | ||
rug | ||
typenum |
FIXME
Complex Numbers
Recipe | Crates | Categories |
---|---|---|
Create Complex Numbers | ||
Add Complex Numbers | ||
Use Mathematical Functions on Complex Numbers |
Linear Algebra
Recipe | Crates | Categories |
---|---|---|
Calculate Vector Norms | ||
Add Matrices | ||
Multiply Matrices | ||
Multiply a Scalar with a Vector and a Matrix | ||
Invert a Matrix | ||
Compare Vectors | ||
(De)serialize a Matrix |
Statistics
Recipe | Crates | Categories |
---|---|---|
Calculate Measures of Central Tendency | ||
Compute the Standard Deviation |
Trigonometry
Recipe | Crates | Categories |
---|---|---|
Calculate the Side Length of a Triangle | ||
Verify that tan is Equal to sin Divided by cos | ||
Calculate the Distance Between two Points on Earth |
Memory Management
Lazy Initialization
Recipe | Crates | Categories |
---|---|---|
std | ||
once_cell | ||
lazy_static | ||
Declare Lazily Evaluated Constants |
Memory Allocation
Recipe | Crates | Categories |
---|---|---|
bumpalo | ||
Garbage Collection with seize | ||
slab | ||
wee_alloc |
FIXME
Network Programming
Reverse Proxy
Recipe | Crates | Categories |
---|---|---|
rathole | ||
ngrok | ||
nginx | nginx proxy manager⮳ | |
pingora |
Server
Recipe | Crates | Categories |
---|---|---|
Listen on Unused Port TCP/IP | ||
Perform Asynchronous I/O Operations on Storage Devices |
OS
External Commands
Low Level System Calls
Recipe | Crates | Categories |
---|---|---|
Call libc , the C Standard Library |
Rust OS
Recipe | Crates | Categories |
---|---|---|
Host Containers with bottlerocket | ||
Run a Rust Operating System on your Computer with Redox |
OS: Windows APIs
Windows
Recipe | Crates | Categories |
---|---|---|
Bind to Windows APIs with windows | ||
Bind to Windows APIs with winapi |
Parser Implementations
HTML
Recipe | Crates | Categories |
---|---|---|
Parse HTML with html5ever | ||
Parse HTML with tl | ||
Parse CSS with cssparser | ||
scraper |
FIXME
INI
Recipe | Crates | Categories |
---|---|---|
Parse INI Configuration Files with rust-ini |
JSON
Recipe | Crates | Categories |
---|---|---|
Parse JSON with json5 | ||
Parse JSON with serde_json | ||
Parse JSON with simd-json |
Markdown
Recipe | Crates | Categories |
---|---|---|
comrak | ||
markdown | ||
pulldown-cmark |
Programming Languages
Recipe | Crates | Categories |
---|---|---|
Parse JavaScript | ||
Parse SQL | ||
Parse Rust Code | ||
Parse WebAssembly (WAT/WASM) |
FIXME
TOML
Recipe | Crates | Categories |
---|---|---|
basic_toml | ||
toml_edit | ||
toml |
XML
Recipe | Crates | Categories |
---|---|---|
quick-xml | ||
xml-rs | ||
xml5ever | ||
xmlparser | ||
Parse XML as a read-only tree with roxmltree |
YAML
Recipe | Crates | Categories |
---|---|---|
Parse YAML with serde_yml |
Error: Handling
Error Customization
Recipe | Crates | Categories |
---|---|---|
anyhow | ||
thisError | ||
miette | ||
color-eyre |
FIXME
Error Handling
FIXME review
Template Engine
tera
Recipe | Crates | Categories |
---|---|---|
Create HTML Files from a Template |
tinytemplate
Recipe | Crates | Categories |
---|---|---|
Create Markdown Fragments from a Template |
Text Editors
IDEs
FIXME
Text Processing
Diffing
FIXME
Other Strings
Recipe | Crates | Categories |
---|---|---|
bstr | ||
CString and CStr | ||
OsString and OsStr |
FIXME
Regex
FIXME
String Concat
Recipe | Crates | Categories |
---|---|---|
Concatenate Strings |
String Manipulation
FIXME
String Parsing
Recipe | Crates | Categories |
---|---|---|
Implement the FromStr Trait for a Custom struct |
String Search
Recipe | Crates | Categories |
---|---|---|
aho-corasick | [![aho-corasick][c-aho-corasick-badge]][c-aho-corasick] | |
fuzzy-matcher | [![fuzzy-matcher][c-fuzzy-matcher-badge]][c-fuzzy-matcher] | |
memchr | ||
strsim |
FIXME
Unicode
Recipe | Crates | Categories |
---|---|---|
Collect Unicode Graphemes |
FIXME
Web Programming
HTTP Types and Interfaces
Recipe | Crates | Categories |
---|---|---|
http | ||
http-body | [![http-body][c-http-body-badge]][c-http-body] | |
http-body-util | [![http-body-util][c-http-body-util-badge]][c-http-body-util] |
FIXME
MIME
Recipe | Crates | Categories |
---|---|---|
Get a MIME Type from a String | ||
Get a MIME Type from a Filename | ||
Parse the MIME Type of a HTTP Response |
Scraping
Recipe | Crates | Categories |
---|---|---|
Extract all Links from the HTML of a Webpage | ||
Check a Webpage for Broken Links | ||
Extract all Unique Links from a MediaWiki Markup |
URL
Web Programming: HTTP Client
APIs
Recipe | Crates | Categories |
---|---|---|
Query the GitHub API | ||
Check if an API Resource Exists | ||
Create and Delete a Gist with the GitHub API | ||
Consume a Paginated RESTful API | ||
Handle a Rate-limited API |
Download
Recipe | Crates | Categories |
---|---|---|
Download a File to a Temporary Directory | ||
Make a Partial Download with HTTP Range Headers | ||
POST a File to paste.rs |
HTTP Clients
Recipe | Crates | Categories |
---|---|---|
reqwest | ||
ureq | ||
Build a HTTP Client with hyper |
Requests
Recipe | Crates | Categories |
---|---|---|
Make a HTTP GET Request | ||
Make a HTTP GET Request Asynchronously | ||
Set Custom Headers and URL Parameters for a REST Request |
Web Programming: HTTP Server
CORS
Recipe | Crates | Categories |
---|---|---|
Implement CORS |
Middleware
Recipe | Crates | Categories |
---|---|---|
tower | ||
tower-http | ||
Investigate Alternatives to tower |
Other Frameworks
Recipe | Crates | Categories |
---|---|---|
Implement a HTTP Server Using rocket |
FIXME
Static Website Generators
Recipe | Crates | Categories |
---|---|---|
Create a Simple Website Using a Static Website Generator |
Contributing
API Documentation
Generate the docs.rs Documentation |
Using a Dev Container Feature |
Other Methods to Preview the Documentation HTML |
Dev Container Docker
Dev Environment Setup
FIXME
Development Editing
FIXME
Optional Preprocessors
FIXME
Publication
FIXME
Repo Structure
FIXME
Topics of Interest
FIXME
Crates
Language
Attributes
Attributes |
Lint Attributes |
Automatically Derive Common Traits |
Mark as must use |
Mark as deprecated |
Compile Conditionally |
cfg-if |
Closures
Control Flow
Enums
Functions
Generics
Iterators
Lifetimes
Macros
Main
Match
Modules
Ownership Borrowing
Rust Install
Simple Data Types
Slices
Structs
Trait Objects
Traits
Variables and Constants
Links
Blogs Podcasts Meetups
Books
Companies
Example Code
Learning Rust |
Rust Cheatsheets |
Comparison to other languages |
Books |
Example code |
Rust Blogs & Podcasts |
Newsletters |
Meetups |
Companies |
Lists of Rust links |
Learning
Links
Rust Cheatsheets
Standard Library
AsRef
Recipe | Crates |
---|---|
AsRef and &T |
Cow
Recipe | Crates |
---|---|
Convert Cow to &str | |
Convert Cow to String |
Derive
Hashmaps
Recipe | Crates |
---|---|
Hashmaps |
Option
Recipe | Crates |
---|---|
Option | |
Use Adapters when Working with References | |
Extract the Value Contained in Option | |
Use Combinators |
Result
Recipe | Crates |
---|---|
Result |
Smart Pointers
Strings
Recipe | Crates |
---|---|
String | |
String Formatting; Placeholders | |
Concatenate Strings |
Vectors
Recipe | Crates |
---|---|
Vec |