Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
without.boats
...Future> MaybeDone<F> { fn maybe_poll(&pin mut self, cx: &mut Context<'_>) { if let MaybeDone::Polling(fut) = self { if let Poll::Ready(res) = fut.poll(cx) { *self = MaybeDone::Done(UnpinCell::new(Some(res))); } } } fn is_done(&self) -> bool { matches!(self, &MaybeDone::Done(_)) } fn take_output(&pin mut self) -> Option<F...
Observations/Thoughts 2024-10-23 ~2 min read
saybackend.com
...pub fn missing_where_operations(&self) -> Vec<Operation> { let mut missing = Vec::new(); for stmt in &self.statements { match stmt { // Check UPDATE Statement::Update { selection, .. } if selection.is_none() => { missing.push(Operation::Update); } // Check DELETE Statement::Delete { selection, .. } if selection.is_none() => { missing.push(Operation::Delete); } _ => {} } } missing } }NoSQL QueryPostgres Parses...
Rust Walkthroughs 2026-02-18 ~10 min read
rust-osdev.com
...Linux 6.15 kernel arrives - and it's big a victory for Rust fans Rust Coreutils 0.1 Released With Big Performance Gains - Can Match Or Exceed GNU Speed Edit is now open source ChromeOS Virtual Machine Monitor is written in Rust with over 300k LoC First look at Blinksy...
Newsletters 2025-06-18 ~2 min read
aturon.github.io
...Note that compare_and_swap atomically changes the value of an AtomicPtr from an old value to a new value, if the old value matched. Also, for this post you can safely ignore the Acquire, Release and Relaxed labels if you’re not familiar with them. impl<T> Stack<T...
From the Blogosphere 2015-08-31 ~20 min read
minikin.me
...RefCell::new(None) } } fn area(&self) -> f64 { let mut cache = self.cached_area.borrow_mut(); match *cache { Some(area) => { println!("Returning cached area: {}", area); area } None => { println!("Computing area..."); let area = self.width * self.height; // Only for debugging purposes to track how many times the area is actually computed. COMPUTE...
Observations/Thoughts 2025-02-05 ~7 min read
blog.singleton.io
...Here you can see a closure in Rust and the extremely versatile match block and Option enum which reminds me of Scala code. |texture: &Option<(Vec<u8>, usize, usize, String)>| { match texture { Some(tuple) => tuple.3.clone(), None => "".to_string(), } } In fact writing Rust code reminds me most of writing...
Rust Walkthroughs 2022-01-05 ~20 min read
llogiq.github.io
...So I randomly commented out code sections and found that the part where we find the replaced sequence length and count matches in parallel (using rayon to join the threads) caused the error. However, somewhat surprisingly, removing the threads and running the code on the main thread did not solve...
News & Blog Posts 2019-10-01 ~2 min read
kerkour.com
...Building HTTP client"); // will match https://...?page=XXX let page_regex = Regex::new(".*page=([0-9]*).*").expect("spiders/github: Compiling page regex"); GitHubSpider { http_client, page_regex, expected_number_of_results: 100, } } } Extracting the item is just a matter of parsing the JSON, which is easy thanks to reqwest, which...
Rust Walkthroughs 2022-05-11 ~2 min read
weihanglo.tw
...It can be a wrapper of Cargo or use cargo-the-library.Matching the result of dependency resolutionIn an ideal world, a published crate on crates.io is guaranteed to be buildable. Other developers can fetch its source and build it flawlessly. This guarantee is upheld with the Cargo ad...
Observations/Thoughts 2024-07-17 ~15 min read
tweedegolf.nl
...Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { // Ignoring pin projection here loop { match self { Unresumed { input } => { let blah = input > 10; // Preamble *self = BarFut::Inlined { foo: foo(blah) }; }, Inlined { foo } => { break foo .poll(cx) .map(|result| result * 2) // Postamble }, } } } } That's a lot better than what's currently generated...
Observations/Thoughts 2026-05-06 ~11 min read
jduchniewicz.com
...Option<HitRecord> = None; let mut closest_so_far = t_max; for object in &self.objects { match object.hit(ray, t_min, closest_so_far) { Some(rec) => { closest_so_far = rec.t; temp_rec.replace(rec); } None => {} } } temp_rec } } Notice how the bool variable is gone and the code seems to...
Miscellaneous 2021-03-17 ~25 min read
jduchniewicz.com
...Option<HitRecord> = None; let mut closest_so_far = t_max; for object in &self.objects { match object.hit(ray, t_min, closest_so_far) { Some(rec) => { closest_so_far = rec.t; temp_rec.replace(rec); } None => {} } } temp_rec } } Notice how the bool variable is gone and the code seems to...
Rust Walkthroughs 2021-03-03 ~25 min read
rust-lang.github.io
...offset(offset as isize) as *const usize); let v = *(ptr.offset((offset + usize_bytes) as isize) as *const usize); // break if there is a matching byte let zu = contains_zero_byte(u ^ repeated_x); let zv = contains_zero_byte(v ^ repeated_x); if zu || zv { break; } } offset += usize_bytes * 2...
RFC 2043 RFC 2017-06-20 ~7 min read
hiddentao.com
...The contract checks to ensure that the obfuscated version of this matches what the user last sent in during the commit phase. The user's vote only counts towards the final tally if there is a match. Note that users can perform this action once. Anyone can query the contract...
Learn More Rust 2020-08-18 ~11 min read
notgull.net
...let waker = this.waker_for_slot(index, cx.waker()); let mut slot_context = Context::from_waker(&waker); let future_slot = match this.futures.get_mut(index) { Some(slot) => slot, None => continue }; if let Some(future) = future_slot.as_mut() { // Try to poll this future. match future.as_mut().poll(&mut...
Observations/Thoughts 2024-04-03 ~11 min read
blog.kuviman.com
...Not really knowing what exactly we were going to make, I started making the things we thought would match any theme. The first thing I did was limited view and generating objects only outside of it. Next, I made it so players could move towards the tile they clicked on...
Observations/Thoughts 2020-10-28 ~7 min read
burn.dev
...To preserve the previous behavior, make sure to specify the matching options: - let output = tensor.grid_sample_2d(grid, InterpolateMode::Bilinear); + let options = GridSampleOptions::new(InterpolateMode::Bilinear) + .with_padding_mode(GridSamplePaddingMode::Border) + .with_align_corners(true); + let output = tensor.grid_sample_2d(grid, options); QuantStore The QuantStore variants used in...
Project/Tooling Updates 2026-01-21 ~6 min read
o-santi.github.io
...want to match 3 words of 2 digit numbers followed by a capital letter? great, they can do that. want to match balanced parenthesized expressions? sadly, regex is incapable of ever solving that, because that language is not regular, so no matter how hard you try it will never solve...
Observations/Thoughts 2024-06-05 ~12 min read
leod.github.io
...gl::Program<U, V, F> = gl.create_program( vertex_shader, fragment_shader, )?; program .with_uniforms(/* uniform bindings matching U */) .with_framebuffer(/* framebuffer matching F */) .with_settings(/* draw settings */) .draw(/* vertex specification matching V */)?; Shader functions are written as normal Rust code that interacts with types from posh::sl, thereby leveraging...
Observations/Thoughts 2023-06-07 ~32 min read
adotinthevoid.github.io
...For example cargo-check-external-types first attempts to deserialize just the format version, and bails if that doesn’t match. This means the user receives an error about the version of nightly being wrong, which is much more useful and actionable than an error about a missing or unknown...
Observations/Thoughts 2023-01-04 ~11 min read
"… the experience I had in 2019 was dramatically better than the first time I touched the language. After a month I’m feeling very comfortable, and..."

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.