Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
www.meilisearch.com
...At indexing time — Create a text embedding based on title and description as text, and create an image embedding based on the image URL At search time — Allow matching text based on a text query and image based on an inlined image The payload below allows updating embedder settings accordingly...
Project/Tooling Updates 2025-08-06 ~3 min read
rustc-dev-guide.rust-lang.org
...It is a bug if the index of a Param does not match what the EarlyBinder binds. For example, if the index is out of bounds or the index of a lifetime corresponds to a type parameter. These sorts of errors are caught earlier in the compiler during name resolution...
Guide to Rustc Development Book 2024-01-01 ~3 min read
doc.rust-lang.org
...When we use the get method with the index passed as an argument, we get an Option<&T> that we can use with match. Rust provides these two ways to reference an element so that you can choose how the program behaves when you try to use an index value...
The Rust Programming Language Book 2024-02-01 ~8 min read
blog.kuviman.com
...Err), } #[derive(Debug, Copy, Clone)] pub struct Percent(u8); impl FromStr for Percent { type Err = ParsePercentError; fn from_str(s: &str) -> Result<Self, ParsePercentError> { match s.parse() { Ok(value) if value <= 100 => Ok(Percent(value)), Ok(_) => Err(ParsePercentError::TooBig), Err(e) => Err(ParsePercentError::ParseIntError(e)), } } } - dialoguer & indicatif Sometimes you need...
News & Blog Posts 2018-07-24 ~3 min read
lib.rs
...use osmpbf::{ElementReader, Element}; let reader = ElementReader::from_path("tests/test.osm.pbf")?; // Count the ways let ways = reader.par_map_reduce( |element| { match element { Element::Way(_) => 1, _ => 0, } }, || 0_u64, // Zero is the identity value for addition |a, b| a + b // Sum the partial results )?; println!("Number of ways...
Crate of the Week 2022-06-08 ~3 min read
rust-lang.github.io
...Rather, the trait matching system implicitly instantiates impls as part of trait matching. This implies that all type parameters are always instantiated with type variables. These type variables are assigned fallbacks according to the defaults given. Type variables with fallbacks We extend the inference system so that when a type...
RFC 213 RFC 2015-02-04 ~18 min read
www.lpalmieri.com
...a GET request to /home/1 will match with both! But the request handler will fail to extract route parameters from /home/:id if you forget to change the field name in HomeRouteParams from home_id to id. Even worse, the failure will happen at runtime—if there are no...
Project/Tooling Updates 2023-04-26 ~12 min read
laurmaedje.github.io
...u64) -> u64 { match n { 0 => 0, 1 => 1, n => fib(n-1) + fib(n-2), } } In its naive recursive variant, executing this function takes exponential time. With memoization, however, each unique call to fib will be evaluated just once. This way, we can cut the running time down from exponential...
Observations/Thoughts 2022-10-19 ~8 min read
romankudryashov.com
...Request<PlanetRequest>, ) -> Result<Response<PlanetResponse>, Status> { debug!("Got a request: {:?}", request); let planet_name = request.into_inner().name; let planet = persistence::repository::get_by_name(&planet_name, &get_connection(&self.pool)); match planet { Ok(planet) => { let planet = PlanetWrapper { planet: planet.0, satellites: planet.1, } .into(); let reply = PlanetResponse { planet: Some...
Rust Walkthroughs 2021-04-28 ~7 min read
www.meilisearch.com
...enable equality operators for exact matching, while disabling unused features such as comparison operators and facet search. This targeted configuration can notably boost indexing performance. Experimental: composite embedders Meilisearch 1.14 introduces a new experimental feature that lets you use different embedders at search and indexing time, allowing you to...
Project/Tooling Updates 2025-04-16 ~3 min read
rustc-dev-guide.rust-lang.org
...This prevents users from using an impl which is entirely covered by a where-bound, matching the behavior of the old implementation and avoiding some weird errors, e.g. trait-system-refactor-initiative#76. NormalizesTo goals are a function See the normalization chapter. We replace the expected term with an...
Guide to Rustc Development Book 2024-01-01 ~3 min read
rust-lang.github.io
...Humans comprehend information through pattern matching. By ensuring that all Rust code has similar formatting, less mental effort is required to comprehend a new project, lowering the bar to entry for new developers. Thus, there are productivity benefits to using a formatting tool (such as rustfmt), and even larger benefits...
RFC 2436 RFC 2018-05-04 ~3 min read
arstechnica.com
...They also often introduce issues when using old C or C++ libraries—often desirable because so much existing code uses these languages—and so special care has to be taken when mixing and matching. Languages such as Java, C#, and JavaScript also do not use native code, instead tending to...
Notable Links 2015-05-18 ~3 min read
doc.rust-lang.org
...or raw pointer that has invalid metadata: • dyn Trait metadata is invalid if it is not a pointer to a vtable for Trait that matches the actual dynamic trait the pointer or reference points to • slice metadata is invalid if the length is not a valid usize (i.e., it...
The Rustonomicon Book 2024-01-01 ~3 min read
moletrooper.github.io
...for mut body in g.l_body.iter_mut(&g.graph) { let tr = match g.graph.get_neighbor(&body, &g.l_transform) { Some(tr) => tr, None => continue, }; let coll = match graph.get_neighbor(&body, &g.l_collider) { Some(c) => c, None => continue, }; // ...do stuff with `body`, `tr` and `coll`! } // note...
Observations/Thoughts 2020-09-04 ~22 min read
developerlife.com
...Some(#margin_int), } } None => quote! {}, }; let maybe_color_fg_expr = match color_fg { Some(color_expr) => { quote! { color_fg: Some(crossterm::style::#color_expr.into()), } } None => quote! {}, }; let maybe_color_bg_expr = match color_bg { Some(color_expr) => { quote! { color_bg: Some(crossterm::style::#color_expr.into()), } } None => quote! {}, }; quote...
Rust Walkthroughs 2023-06-07 ~16 min read
purplesyringa.moe
...0 }; for ch in &self.slice[..i] { match *ch { b'\n' => { position.line += 1; position.column = 0; } _ => { position.column += 1; } } } position } …which is called from position() to format the error, which is documented as:/// Position of the most recent call to next(). /// /// ... /// /// Only called in case of an error, so...
Observations/Thoughts 2024-08-28 ~18 min read
blog.infinitenegativeutility.com
...I think that it adds an extra hurdle to learnability1, it obscures the (incredibly simple!) way that Rust's error-handling works, it produces an unfortunate asymmetry between producing Result values (where the shape of the data is implied by the context) and matching on Result values (where you will...
News & Blog Posts 2018-06-05 ~8 min read
bitfieldconsulting.com
...You can call C libraries from Rust, or mix and match C++ components with Rust packages. Overall, Rust sits neatly in the “best of both worlds” space between garbage-collected memory-safe languages like Go, and high-performance, close-to-the-metal languages like C++. Happy, productive developers Okay, Rust...
Observations/Thoughts 2026-02-11 ~8 min read
hsivonen.fi
...Let’s have it for plain if and address match and if let once there actually is a workable design for those. No LTS Rust has successfully delivered on “stability without stagnation” to the point that Red Hat delivers Rust updates for RHEL on a 3-month frequency instead of...
Call for Blog Posts 2020-09-16 ~3 min read
"When your Rust build times get slower after adding some procedural macros: We call that the syn tax :ferris:"

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. 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.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
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.