Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
brson.github.io
...let (tx, rx) = async_channel::unbounded(); let handle = thread::spawn(move || { let mut context = FsThreadContext::new(); loop { let msg = block_on(rx.recv()).expect("recv"); match msg { Message::Run(f) => { f(&mut context); }, Message::Shutdown(rsp_tx) => { context.shutdown(); rsp_tx.send(()).expect("send"); break; } } } }); Here’s the other: let...
Observations/Thoughts 2021-01-20 ~3 min read
atilanevesoncode.wordpress.com
...I ended up reading the proposal several times, and it didn’t help that the current implementation doesn’t match that document 100%. In the end, however, the result seems to work: https://github.com/atilaneves/fearless It’s possible that, due to bugs in DIP1000 or in fearless itself...
News & Blog Posts 2018-11-13 ~3 min read
argmin-rs.org
...This is a breaking change for those who match on TerminationReason.Optional timeoutExecutor now allows one to terminate a run after a given timeout, which can be set with the timeout method of Executor. The check whether the overall runtime exceeds the timeout is performed after every iteration, therefore the...
Project/Tooling Updates 2024-02-28 ~3 min read
sixtyfps.io
...Fix rendering of text selection with combining characters and ligatures with the GL backend (d867d7) When the text selection end follows right after a grapheme that uses multiple code points, then there may not be a matching glyph with the byte index. Therefore we wouldn't set the selection_end...
Project/Tooling Updates 2021-08-04 ~3 min read
bluejekyll.github.io
...Vec<u8> = Vec::with_capacity(512); loop { match socket.recv_from(&mut buffer) { Ok((_)) => /* do something with data */, Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => { /* do something while waiting */ continue }, error => return error, } } The code is more complex, but it has a special feature: instead of blocking you...
News & Blog Posts 2016-12-06 ~18 min read
borretti.me
...fn foo() -> Result<(), DbError> { let db = match open_database(path) { Ok(db) => db, Err(e) => { // Rethrow. return Err(e); } }; let tx = match begin(db) { Ok(tx) => tx, Err(e) => { return Err(e); } }; let data = match query(tx, "...") { Ok(data) => data, Err(e) => { return Err(e); } }; match rollback(tx) { Ok(_) => (), Err...
Observations/Thoughts 2025-04-16 ~19 min read
beyermatthias.de
...HttpRequest) -> impl Responder { match metrics_handler(mpd_data).await { Ok(text) => { HttpResponse::build(StatusCode::OK) .content_type("text/text; charset=utf-8") .body(text) } Err(e) => { HttpResponse::build(StatusCode::INTERNAL_SERVER_ERROR) .content_type("text/text; charset=utf-8") .body(format!("{}", e)) } } } but here, we bind the mpd client object...
Rust Walkthroughs 2021-01-06 ~8 min read
trifectatech.org
...Improved performance Our rust implementation generally outperforms the C implementation, though there are a couple of cases where we only match C performance. We are not aware of any cases where we are substantially slower. For compression, we are a fair amount faster. For bzip2, the level indicates how much...
Project/Tooling Updates 2025-06-18 ~3 min read
llogiq.github.io
...u8) -> u8 { match c as char { 'A' => 0, 'C' => 1, 'G' => 2, 'T' => 3, _ => panic!("{}", c as char), } } needed for the optimized hash of the string. The precise numbers don’t matter; all that matters is that each gets a unique 2-bit encoding. It would really help to optimize...
News & Blog Posts 2015-10-05 ~9 min read
ryhl.io
...This is a method that lets you go through a vector and remove all items that fail to match some condition. The items that are left in the vector are all shifted towards the beginning of the array to remove holes, and remain in the same order as they were...
Learn More Rust 2020-08-18 ~8 min read
phildawes.net
...If racer is to work as a library in a long running process it will need the capability to allow editors to pass unsaved code to it directly and not get confused when it doesn't match what's on disk. Type inference + rustc This is probably Racer's biggest...
Project Updates 2015-02-09 ~3 min read
rustc-dev-guide.rust-lang.org
...For goals which reach the recursion limit we currently only use the cached result if the available depth exactly matches the depth of the entry. The cache entry for each goal therefore contains a separate result for each remaining depth: source.[^1] Handling cycles The trait solver has to support...
Guide to Rustc Development Book 2024-01-01 ~3 min read
cooscoos.github.io Archived: primary link replaced with an archive on 2026-09-12T11:40:44.382Z (UTC; replacement date, not snapshot date)
...The best you can do is to hope that you already have a steel mould that matches your note, like this: fn main() { // Someone has given you a note that says Rolo on it let note: String = "Rolo".to_string(); let mould_location: &'static str = match note { _ if note == "Rolo...
Observations/Thoughts 2022-09-14 ~14 min read
bit.ly
...The build method will attempt to consume the builder and return a reader with a schema that matches what is in the file.Compute KernelsThe compute kernels are the workhorses of Apache Arrow. Many kernel functions are provided, but this section will only cover the filter and sort functions in...
Rust Walkthroughs 2021-03-24 ~9 min read
msirringhaus.github.io
...These can easily be matched for in the application code by using the last link in your error-chain, which anyhow provides with the root_cause() function. Or you could match only the top most error and redoing the minidump-section on your own, if the library code fails in...
Rust Walkthroughs 2021-02-10 ~9 min read
doc.rust-lang.org
...It will perform auto-referencing, auto-dereferencing, and coercion until types match. The detailed mechanics of method lookup are defined here, but here is a brief overview that outlines the main steps. Suppose we have a function foo that has a receiver (a self, &self or &mut self parameter). If...
The Rustonomicon Book 2024-01-01 ~3 min read
kerkour.com
...bool) { // See https://github.com/esp-rs/esp-hal-community/tree/main/esp-hal-smartled // for example on how to control the onboard RGB led let (color, level) = match led_on { true => (RGB8 { r: 255, g: 255, b: 255 }, 10), false => (RGB8 { r: 0, g: 0, b: 0 }, 0), }; led...
Rust Walkthroughs 2026-03-25 ~16 min read
rust-trends.com
...This ensures that the client can match the response to its original query.A complete DNS response consists of:Header – Metadata and response flagsQuestion – Echoed back from the requestAnswer – The resolved IP address or relevant dataNote: including the question section in the response is a standard part of the DNS...
Rust Walkthroughs 2025-03-05 ~23 min read
leshow.github.io
...u8) -> Self { match s { 0b0001 | 0b0111 | 0b1000 | 0b1110 => Direction::Clockwise, 0b0010 | 0b0100 | 0b1011 | 0b1101 => Direction::CounterClockwise, _ => Direction::None, } } } I’ve got a Rotary struct that holds both pins and state. pub struct Rotary<A, B> { pin_a: A, pin_b: B, state: u8, } Now for the embedded-hal part. How...
News & Blog Posts 2019-10-22 ~3 min read
appwrite.io
...all() .build() .unwrap(); let result = runtime.block_on(async move { tables_db .create_row( "<DATABASE_ID>", "<TABLE_ID>", ID::unique(), json!({}), None, None, ) .await }); match result { Ok(_) => context.res.text("Row created", None, None), Err(e) => { context.error(format!("Failed to create row: {}", e)); context.res.text("Failed to create...
Project/Tooling Updates 2026-05-13 ~3 min read
"The generated program is a random sequence of bytes that just happens to take the shape of a seemingly working program by accident. Such is the joy of..."

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.