Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
soasis.org
...But, it can only be talked about directly in match expressions and pattern matching contexts. It would be helpful to be able to clearly refer to such a type, for both std::mem::discriminant_at’s API and also to solidify the spelling of access for std::mem::offset_of...
Observations/Thoughts 2023-05-03 ~71 min read
nrxus.github.io
...23.12005, }]; // no more `unsafe` for mocking methods with references as arguments // when! supports argument matching when!(bus_client.stops(bus::StopsQuery { lat: 34.32, lon: 23.12, lat_span: 0.002, lon_span: 0.0005, max_count: 20, })) // for simple cases we can just mock the return value .then...
Project/Tooling Updates 2021-04-21 ~3 min read
tonbo.io
...Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Item> { match self.accept() { Ok((stream, _)) => Poll::Ready(Ok(stream)), Err(e) if e.kind() == io::ErrorKind::WouldBlock => { // register the file descriptor in TcpListener // from the epoll interest list ... Poll::Pending } Err(e) => Poll::Ready(Some(Err(e))), } } } "self.accept()" runs synchronously...
Observations/Thoughts 2024-11-06 ~9 min read
rust-lang.github.io
...across all binaries • Noisy test output (see also #5089) • Confusing command-line interactions (see also #8903, #10392) • Poor messaging when a filter doesn't match • Smarter test execution order (see also #8685, #10673) • JUnit output is incorrect when running multiple test binaries • Lack of failure when test binaries exit unexpectedly...
RFC 3558 RFC 2024-01-18 ~4 min read
scattered-thoughts.net
...There is no pattern matching, but a switch on enums and unions is checked for exhaustiveness at compile time. This covers ~90% of my use of pattern matching. More complex matches (eg) have to handled by chained if statements. This is usually less readable than the equivalent rust and I...
Miscellaneous 2020-10-21 ~24 min read
lukefleed.xyz
...This predictability is essential for binary compatibility, memory-mapped I/O, and network protocols where byte offsets must match external specifications. It is also a constraint: we bear responsibility for field ordering, and a careless declaration can bloat a frequently-allocated struct. Rust makes a different choice. By default, the...
Observations/Thoughts 2026-01-07 ~57 min read
lwn.net
...In the current version of Rust, however, it has the annoying property of keeping any temporaries involved in the match alive until after the corresponding else block. For example, in this code the std::sync::Mutex remains locked in the else branch: if let Some(x) = mutex.lock().some_method...
Project/Tooling Updates 2025-01-29 ~9 min read
github.blog
...Pattern matching. This powerful language feature enables developers to concisely and effectively match complex data structures against specific patterns to extract and handle different cases or scenarios in a clean and readable manner. Type inference. This feature allows Rust’s compiler to automatically detect an expression based on context while...
Miscellaneous 2023-09-06 ~9 min read
dev.to
...process-name Fuzzy-match against running processes by name — handy when the PID isn't known ahead of time. Note: spawn currently needs a path with a separator in it — ./my_app, build/my_app.exe — even when the binary sits right in the working directory. A bare filename like...
Project/Tooling Updates 2026-07-08 ~3 min read
aatch.github.io
...Other than the type parameter, it matches the signature of the callback for the ffi::do_thing function. Inside the wrapper, we cast the closure to a *mut Option<F>, then do (*opt_closure).take().unwrap() on it, this returns the actual unboxed closure we started with. Then we call...
Blog Posts 2015-01-19 ~3 min read
rustc-dev-guide.rust-lang.org
...Now, we have a matching panic_handler lang item in the std. This function goes through the same process as the extern { fn panic_impl } definition in core, ending up with a symbol name of rust_begin_unwind. At link time, the symbol reference in core will be resolved to...
Guide to Rustc Development Book 2024-01-01 ~3 min read
rust-lang.github.io
...Similarly, the published Cargo.toml will not explicitly declare any dependencies that match the implicit state. builtin dependencies that do match the implicit state could be made explicit in a future edition. See the following sections for rationale/alternatives: • Why add standard library crates to Cargo's index? • Why add...
RFC 3875 RFC 2025-06-05 ~31 min read
r2cn.dev
...let src_node = self.copy_node_up(ctx, Arc::clone(src_node)).await?; let src_ino = src_node.first_layer_inode().await.2; match self .lookup_node_ignore_enoent(ctx, new_parent.inode, name) .await? { Some(n) => {...} None => { // Copy parent node up if necessary. let new_node: Arc<Mutex<Option...
Observations/Thoughts 2025-08-13 ~13 min read
siliconsprawl.com
...These tools are often packaged into a suite and targeted towards reverse engineering and malware analysis, they come with far more features than “give me a good disassembly and make it easy to visualize/browse.” Hopefully it’ll be easier to match the --emit=asm build config to a normal...
Observations/Thoughts 2020-11-11 ~8 min read
bonsaidb.io
...Lookup product by id Find product by name (exact match) Create shopping cart Add product to cart Checkout Review a product A single plan is generated by using probabilities to adjust how many plans succeed in each step of the shopping process. Some plans will search for products and never...
Project/Tooling Updates 2022-01-19 ~3 min read
tokio.rs
...That said, it is still possible to "mix & match" if you need to do both. See this blog post for a practical example. Reading a lot of files. Although it seems like Tokio would be useful for projects that simply need to read a lot of files, Tokio provides no...
Learn 2020-07-28 ~3 min read
www.wilfred.me.uk
...This can be inconvenient because nightly may change an API and you need to downgrade your compiler until the libraries have been updated to match. In both cases (1, 2) these libraries depend on compiler plugins. This is fairly rare in practice, but it would be nice to see compiler...
From the Blogosphere 2015-06-22 ~3 min read
minikin.me
...u32 = 1000; loop { let head = self.head.load(Ordering::Relaxed, &guard); unsafe { (*node.as_raw()).next.store(head, Ordering::Release); } match self.head.compare_exchange( head, node, Ordering::AcqRel, Ordering::Acquire, &guard, ) { Ok(_) => { self.size.fetch_add(1, Ordering::Relaxed); return Ok(()); } Err(_) => { attempts += 1; if attempts >= MAX_ATTEMPTS { return...
Rust Walkthroughs 2025-02-26 ~14 min read
www.joshfinnie.com
...Value) -> Result<String> { let period: &str = match config.period.as_str() { "overall" => "", "7day" => " week", "1month" => " month", "3month" => " 3 months", "6month" => " 6 months", "12month" => " year", _ => return Err(anyhow!("Period {} not allowed. Only allow \"overall\", \"7day\", \"1month\", \"3month\", \"6month\", or \"12month\".", config.period)) }; let mut f = format!( "♫ My Top {} played artists in...
Rust Walkthroughs 2022-12-21 ~9 min read
rustfoundation.org
...Reach out to us at maintainers-fund@rustfoundation.org to discuss how your organization can support the fund at a level that matches what you get out of Rust. All Hands On Deck Rust is a critical tool for software safety, security, and performance in today’s world, and it...
Foundation 2026-06-03 ~3 min read
"the compiler usually doesn't complain about \[you\] doing undefined behavior because it doesn't know that you're doing undefined behavior."

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.