Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
Cookin' with Rust This Rust Cookbook is a collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem. Read more about Rust Cookbook, including tips for how to...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
About "Cookin' with Rust" Table of contents • Who this book is for • How to read this book • How to use the recipes • A note about error handling • A note about crate representation Who this book is for This cookbook is intended for new Rus...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~3 min read
Algorithms | Recipe | Crates | Categories | |--------|--------|------------| | Generate random numbers | [![rand-badge]][rand] | [![cat-science-badge]][cat-science] | | Generate random numbers within a range | [![rand-badge]][rand] | [![cat...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Generate Random Values
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Sorting Vectors
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Asynchronous | Recipe | Crates | Categories| |-------|-------|----------| | Tokio Runtime |[![tokio-badge]][tokio]| [![cat-asynchronous-badge]][cat-asynchronous] | | Tokio Runtime Builder |[![tokio-badge]][tokio] [![std-badge]][std]| [![cat...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Async Runtime When your program asks for something that takes time, e.g reading a file, fetching data from a server, waiting for a timer, it has two choices: sit and wait doing nothing, or go do something else while it waits. Blocking means...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
File IO
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Timeouts [![tokio-badge]][tokio] [![std-badge]][std] Sometimes a task takes too long and you don't want to wait forever. A timeout puts a time limit on a task. If it finishes in time you get the result, if it doesn't, it is cancelled and yo...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Message Passing When your program has multiple tasks running at the same time, they sometimes need to talk to each other. Channels are how you do that, one task sends a message, another receives it. Think of it like a pipe: you put somethin...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Select First to Complete
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Structured Concurrency When your program runs multiple tasks at the same time, you need a way to keep track of them, know when they finish, collect their results, and clean up if something goes wrong. This section shows how to do that. Join...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Command Line | Recipe | Crates | Categories | |--------|--------|------------| | Parse command line arguments | [![std-badge]][std] | [![cat-command-line-badge]][cat-command-line] | | Clap Basic Argument Parsing | [![clap-badge]][clap] | [!...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Parse command line arguments
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
ANSI Terminal
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Environment Variables The env module lets you inspect and manipulate the process environment, including env vars, CLI args, and working directories. Get Environment Variables var fetches an env var from the current process. It returns Resul...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~2 min read
Compression | Recipe | Crates | Categories | |--------|--------|------------| | Decompress a tarball | [![flate2-badge]][flate2] [![tar-badge]][tar] | [![cat-compression-badge]][cat-compression] | | Compress a directory into a tarball | [![...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Working with Tarballs
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Concurrency | Recipe | Crates | Categories | |--------|--------|------------| | Spawn a short-lived thread | [![crossbeam-badge]][crossbeam] | [![cat-concurrency-badge]][cat-concurrency] | | Create a parallel data pipeline | [![crossbeam-ba...
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
Threads
rust-lang-nursery.github.io The Rust Cookbook Book 2024-01-01 ~1 min read
"There actually are NOT very many places where the C code’s behavior conflicts with Rust’s borrowing rules. This is both somewhat surprising, becau..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, and research. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.