blog.s-m.ac
...Some manual fiddling may be required to get the memory representation to match, but often it’s just a question of shifting by a few bytes one way or another.In the present document we focus on interfacing OCaml [@leroy2013ocaml], Rust [@matsakis2014rust] and C [@ritchie1988c] but more languages support this...
News & Blog Posts
2018-07-24
~13 min read
lwn.net
...The first worked on rest
patterns — patterns in match statements that match the
remainder of a structure. Progress was made, but some patterns remain
unimplemented. The second student worked on moving the lint mechanism away
from GCC's GIMPLE internal
representation, which was unable to support generics, to the gccrs...
Project/Tooling Updates
2025-10-15
~8 min read
firedbg.sea-ql.org
...Option<usize> = None; for coin in coins { let next = m - coin; if next < 0 { continue; } count = match (count, min_coins(next, coins)) { (Some(a), Some(b)) => Some(a.min(b + 1)), (Some(a), None) => Some(a), (None, Some(b)) => Some(b + 1), (None, None) => None, } } fire::dbg!("return", count)}The...
Observations/Thoughts
2024-01-31
~4 min read
pointersgonewild.com
...If the code rustc generated for the match statement dispatch is potato, that would explain a lot.
This is the way my interpreter handled the add instruction in the old tagged enum version (ac75356, src/vm.rs:1498) using match arms to dispatch based on Value types:
Insn::add => {
let...
Observations/Thoughts
2026-08-26
~24 min read
without.boats
...Destructors referencing a freed object (use after free)The second bug occurred in this bit of code:let mut state = self.state.as_ref().lock();
if matches!(&*state, State::Completed(_)) {
callback.cancel();
self.deallocate();
} else {
*state = State::Cancelled(callback);
}
This code implements the Completion::cancel method that we called in...
News & Blog Posts
2020-06-16
~4 min read
calif.io
...The compiler checks that add(2, 3) matches that declaration. It then compiles the C++ code, but the actual implementation resides in the Rust-generated object file or library. The linker then locates the corresponding symbol and combines the compiled C++ and Rust code into an executable file.
An example...
Research
2026-11-18
~10 min read
docs.rs
...formatting, filters, and output can be applied recursively to match increasingly specific kinds of logging. Fern provides a builder-based configuration backing for rust's standard log crate. //! With fern, we can: // Configure logger at runtime fern::Dispatch::new() // Perform allocation-free log formatting .format(|out, message, record| { out.finish...
Crate
v0.7.1
2024-12-15
blog.kdubovikov.ml
...chat_id };
match diesel::insert_into(subscribers).values(&subscriber).execute(connection) {
Ok(_) => Ok(subscriber),
Err(_) => Err("Error while saving new subscriber to DB")
}
} else {
Err("The subscriber already exists")
}
}
/// Deletes a subscriber from the database
pub fn unsubscribe(chat_id: i64, connection: &SqliteConnection) -> QueryResult<usize> {
diesel::delete(subscribers.filter(telegram...
Learn More Rust
2020-10-07
~13 min read
rust-analyzer.github.io
...SyntaxNode) -> SemanticElement {
match node.parent() {
None => module_for_file(node.source_file),
Some(parent) => {
// Recursive call
let parent_semantics = semantics_for_syntax(parent);
for sibling in parent_semantics.children() {
if sibling.source_syntax() == node {
return sibling
}
}
}
}
}
In this formulation, a language server needs to just enough analysis to drill down...
Rust Walkthroughs
2023-12-27
~8 min read
alexandrempsantos.com
...bool = match &json[("hasAlphaChannel")] {
serde_json::Value::Bool(b) => *b,
_ => true,
};
let width = match &json["size"]["width"] {
serde_json::Value::Number(n) => n.as_u64().unwrap_or(0),
_ => 0,
};
let height = match &json["size"]["height"] {
serde_json::Value::Number(n) => n.as_u64().unwrap_or(0),
_ => 0,
};
println!("Rust: json...
Rust Walkthroughs
2021-06-02
~10 min read
linebender.org
...This now is defined to match how Vello was interpreting it.
peniko#139: Better document Mix, Compose and Fill.
peniko#144: Deprecate Mix::Clip and make it no longer the default blend mode.
Release v0.4.1 is a backport release for the Linebender Resource Handle migration.
We expect to...
Project/Tooling Updates
2025-10-15
~4 min read
crates.io
...causes the build to fail if a version of LLVM exactly matching the current crate version is not found. If enabled, linking crate version 150.1.0 against LLVM 16.0 (for example) would fail whereas it is normally permitted. This may be useful if there is known to be...
Crate
v231.0.3
2026-11-27
www.falkordb.com
...AI Assisted Development
The Test Ratchet
Benchmarking against the C engine to make sure we’re still the fastest
We had to match the C engine’s performance. Nobody switches to a slower database because the new one is written in Rust. So we set up benchmarking in CI early...
Project/Tooling Updates
2026-08-05
~1 min read
blog.m-ou.se
...In the matching rules of a macro, we can match on things like expressions, identifiers, types, and many other things.
Since ‘valid Python code’ is not an option, we’ll just make our macro accept anything: raw tokens, as many as needed:
macro_rules! python {
($($code:tt)*) => {
...
}
}
(See the resources...
News & Blog Posts
2020-04-21
~14 min read
blog.yoshuawuyts.com
...In order to do so we can match the
type states back to an actual enum, and wrap the type-state variant in it. This
could look something like this (playground):
use futures_lite::prelude::*;
use futures_time::prelude::*;
use futures_time::time::Duration;
use futures_time::stream;
enum TrafficLightWrapper...
Observations/Thoughts
2023-01-04
~14 min read
gfx-rs.github.io
...Not only we are shaping up the HAL API to match Vulkan as close as possible, we are also implementing a Vulkan Portability layer (for linking with C libraries using vulkan.h) in https://github.com/gfx-rs/portability .
Hardware Abstraction Layer
HAL brings a lot of goodies to the...
News & Blog Posts
2018-01-02
~1 min read
bluejekyll.github.io
...for (l, r) in l.chars().zip(r.chars()) {
match l.to_lowercase().cmp(r.to_lowercase()) {
o @ Ordering::Less | o @ Ordering::Greater => return o,
Ordering::Equal => continue,
}
}
} else {
match l.cmp(r) {
o @ Ordering::Less | o @ Ordering::Greater => return o,
Ordering::Equal => continue,
}
}
}
And the new timings:
running 9...
News & Blog Posts
2018-01-02
~26 min read
ferrous-systems.com
...The process was challenging but matched
what we’ve come to expect from Rust: It enables building correct software at a
much lower cost.”
With this step, we can start rolling out the sales process on Ferrocene. Our
initial availability is limited to a minimum order of 10 license seats...
Project/Tooling Updates
2023-11-08
~1 min read
doc.rust-lang.org
...use std::num::ParseIntError;
fn main() -> Result<(), ParseIntError> {
let number_str = "10";
let number = match number_str.parse::<i32>() {
Ok(number) => number,
Err(e) => return Err(e),
};
println!("{}", number);
Ok(())
}
Rust by Example
Book
2024-01-01
~1 min read