Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
Building a Single-Threaded Web Server We’ll start by getting a single-threaded web server working. Before we begin, let’s look at a quick overview of the protocols involved in building web servers. The details of these protocols are beyond...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~15 min read
From a Single-Threaded to a Multithreaded Server Right now, the server will process each request in turn, meaning it won’t process a second connection until the first connection is finished processing. If the server received more and more r...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~23 min read
Graceful Shutdown and Cleanup The code in Listing 21-20 is responding to requests asynchronously through the use of a thread pool, as we intended. We get some warnings about the workers, id, and thread fields that we’re not using in a direc...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~7 min read
Appendix The following sections contain reference material you may find useful in your Rust journey.
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~1 min read
Appendix A: Keywords The following lists contain keywords that are reserved for current or future use by the Rust language. As such, they cannot be used as identifiers (except as raw identifiers, as we discuss in the “Raw Identifiers” secti...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~3 min read
Appendix B: Operators and Symbols This appendix contains a glossary of Rust’s syntax, including operators and other symbols that appear by themselves or in the context of paths, generics, trait bounds, macros, attributes, comments, tuples,...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~8 min read
Appendix C: Derivable Traits In various places in the book, we’ve discussed the derive attribute, which you can apply to a struct or enum definition. The derive attribute generates code that will implement a trait with its own default imple...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~7 min read
Appendix D: Useful Development Tools In this appendix, we talk about some useful development tools that the Rust project provides. We’ll look at automatic formatting, quick ways to apply warning fixes, a linter, and integrating with IDEs. A...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~3 min read
Appendix E: Editions In Chapter 1, you saw that cargo new adds a bit of metadata to your Cargo.toml file about an edition. This appendix talks about what that means! The Rust language and compiler have a six-week release cycle, meaning user...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~2 min read
Appendix F: Translations of the Book For resources in languages other than English. Most are still in progress; see the Translations label to help or let us know about a new translation! • Português (BR) • Português (PT) • 简体中文: KaiserY/trp...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~1 min read
Appendix G - How Rust is Made and “Nightly Rust” This appendix is about how Rust is made and how that affects you as a Rust developer. Stability Without Stagnation As a language, Rust cares a lot about the stability of your code. We want Ru...
doc.rust-lang.org The Rust Programming Language Book 2024-02-01 ~7 min read
Rust by Example Rust is a modern systems programming language focusing on safety, speed, and concurrency. It accomplishes these goals by being memory safe without using garbage collection. Rust by Example (RBE) is a collection of runnable e...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~1 min read
Hello World This is the source code of the traditional Hello World program. // This is a comment, and is ignored by the compiler. // You can test this code by clicking the "Run" button over there -> // or if you prefer to use your keyboard,...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~1 min read
Comments Any program requires comments, and Rust supports a few different varieties: Regular Comments These are ignored by the compiler: • Line comments: Start with // and continue to the end of the line • Block comments: Enclosed in /* ......
doc.rust-lang.org Rust by Example Book 2024-01-01 ~1 min read
Formatted print Printing is handled by a series of macros defined in std::fmt some of which are: • format!: write formatted text to String • print!: same as format! but the text is printed to the console (io::stdout). • println!: same as pr...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~3 min read
Debug All types which want to use std::fmt formatting traits require an implementation to be printable. Automatic implementations are only provided for types such as in the std library. All others must be manually implemented somehow. The f...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~1 min read
Display fmt::Debug hardly looks compact and clean, so it is often advantageous to customize the output appearance. This is done by manually implementing fmt::Display, which uses the {} print marker. Implementing it looks like this: // Impor...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~3 min read
Testcase: List Implementing fmt::Display for a structure where the elements must each be handled sequentially is tricky. The problem is that each write! generates a fmt::Result. Proper handling of this requires dealing with all the results....
doc.rust-lang.org Rust by Example Book 2024-01-01 ~1 min read
Formatting We've seen that formatting is specified via a format string: • format!("{}", foo) -> "3735928559" • format!("0x{:X}", foo) -> "0xDEADBEEF" • format!("0o{:o}", foo) -> "0o33653337357" The same variable (foo) can be formatted diffe...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~2 min read
Primitives Rust provides access to a wide variety of primitives. A sample includes: Scalar Types • Signed integers: i8, i16, i32, i64, i128 and isize (pointer size) • Unsigned integers: u8, u16, u32, u64, u128 and usize (pointer size) • Flo...
doc.rust-lang.org Rust by Example Book 2024-01-01 ~1 min read
"Rust is like a futuristic laser gun with an almost AI-like foot detector that turns the safety on when it recognises your foot."

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.