rust-lang.github.io
...This brings with it a number of benefits:
• The internal structure can evolve over time to better fit new platforms while being backwards compatible.
• This design matches what one would expect from C, where there's only a flat namespace available.
• Finding an API is quite easy as the answer...
RFC 1291
RFC
2015-09-21
~12 min read
rust-lang.github.io
...The primary proposal is arbitrary order, to match preexisting BinaryHeap iterators.
Unresolved questions
• Concrete shape of the BTreeMap API is not resolved here
• Will closed ranges be used for the drain API?
RFC 1257
RFC
2015-08-14
~3 min read
blog.image-rs.org
...More work was needed to match its performance, both due to differences in workloads (e.g. lots of very small images instead of a single large one) and in the hardware (e.g. low-end ARM chips in older Android phones).
Compatibility and correctness required surprisingly little work. The library...
Project/Tooling Updates
2026-06-24
~7 min read
mainmatter.com
...You'll write your first extern "C" blocks by hand and see what you're promising the compiler when you declare a binding, and what goes wrong when the signature doesn't match.2Types and Data Across the BoundaryHow to move primitive values, strings, structs, and collections across the language...
Rust Walkthroughs
2026-07-01
~3 min read
insanitybit.github.io
...Serialize + Deserialize
{
let (snd, rcv) = ipc::channel().unwrap();
if let Fork::Parent(_) = fork().unwrap() {
return match rcv.recv() {
Ok(t) => SandboxResult::Ok(t),
Err(_) => SandboxResult::Err,
};
}
for descriptor in self.descriptors.iter_mut() {
descriptor.execute();
}
snd.send(closure()).unwrap();
std::process::exit(0);
}
Fork into a child process, the child...
News & Blog Posts
2016-06-13
~3 min read
bamburac.com
...usize) -> usize {
match depth {
0 => 1,
1 => search.legal_moves().moves().len(),
_ => {
let mut count = 0;
let mut search = search.legal_moves();
for index in 0..search.moves().len() {
search
.as_one(index)
.test(|game| count += perft(game, depth - 1));
}
count
}
}
}
Time to see how fast is our move generator...
Rust Walkthroughs
2026-09-09
~16 min read
rust-lang.github.io
...F) -> Option<T> {
let mut foo = unsafe {
mem::uninitialized::<T>()
};
let mut foo_ref = &mut foo as *mut T;
match std::panic::catch_unwind(|| {
let val = f();
unsafe {
ptr::write(foo_ref, val);
}
}) {
Ok(()) => Some(foo);
Err(_) => None
}
}
Naively, this code might look safe. The problem though is that by...
RFC 1892
RFC
2017-02-09
~8 min read
cfallin.org
...Encounter the top-level ~, and try to match the rewrite rule's
left-hand side. It would match with bindings x = (a & b) and y = (c & d).
Apply the right-hand side ~x | ~y bottom-up, building nodes and rewriting
them as we go:
First, ~x. This creates ~(a & b...
Observations/Thoughts
2026-04-15
~53 min read
www.meilisearch.com
...The value of self must match the corresponding key in remotes:
PATCH /network
{
"self": "ms-01"
}
You can now perform a remote federated search:
POST /multi-search
{
"federation": { // enable federated mode
"limit": 5
},
"queries": [
{ // #0
"q": "Batman",
"indexUid": "movies",
"federationOptions": {
"remote": "ms-01"
}
},
{ // #1
"q": "Batman",
"indexUid": "movies",
"federationOptions": {
"remote...
Project/Tooling Updates
2025-02-19
~3 min read
www.fosskers.ca
...So enums can hold inner values (aka "Sums of Products" or "ADTs"), we have Pattern Matching, and we have Traits (which can be auto-derived!). Errors are handled explicitly with the Option and Result types. Further, we can do a kind of "error threading" with the ? operator, which I believe...
Learn Standard Rust
2020-08-18
~16 min read
docs.rust-embedded.org
...Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 2.913879
Info...
The Embedded Rust Book
Book
2024-01-01
~7 min read
www.tglman.com
...Error2) -> Self {
match error2 {
Error2::Error2 => AllErrors::Error2,
Error2::Error3 => AllErrors::Error3,
}
}
}
pub fn operation1() -> Result<(), Error1> {
Err(Error1::Error1)
}
pub fn operation2() -> Result<(), Error2> {
Err(Error2::Error2)
}
pub fn operation3() -> Result<(), Error2> {
Err(Error2::Error3)
}
This solution allows me to expose an API with almost both characteristics: a specific...
Rust Walkthroughs
2021-04-14
~3 min read
slint-ui.com
...This means you can not mix and match C++ and Rust code, but need defined
interfaces to cross from one language into the other.
Challenges
All we need to do is to generate some bindings and everything is smooth
sailing from there on out. How hard can that be?
There...
Rust Walkthroughs
2022-11-16
~17 min read
notes.iveselov.info
...src/librustc_featurearrow-up-rightThere are three modules:active.rs - for unstable featuresaccepted.rs - for stabilised featuresremoved.rs - for, well, removed features (which were once active)Looking at accepted.rsarrow-up-right quickly shows when features were stabilized:/// Allows the use of `if` and `match` in constants.
(accepted, const_if...
News & Blog Posts
2020-07-21
~7 min read
guillaumegomez.github.io
...Look for T-doc tagged issues on GitHub!
Waiting for merge
@estebank reworded E0044 and message for !Send types, suggested setting associated type when type argument is given instead and provided context for missing comma in match arm and if statement without block.
@partim improved documentation for Borrow, AsRef, and...
News & Blog Posts
2018-02-27
~3 min read
rust-gcc.github.io
...for <pattern> in <iterator> {
<body>
}
// becomes
{
let result = match ::std::iter::IntoIterator::into_iter(<iterator>) {
mut iter => {
loop {
let mut __next;
match ::std::iter::Iterator::next(&mut iter) {
::std::option::Option::Some(val) => __next = val,
::std::option::Option::None => break
};
let <pattern> = __next;
<body>;
}
}
};
result
}
The paths used in this...
Project/Tooling Updates
2025-01-08
~12 min read
bennolossin.github.io
...This matches the current behavior of Rust, where a drop_in_place is inserted before a write is performed. This behavior would of course be kept for custom pointers as well.
PlaceDeref is pretty special, we need more time to iron out its design anyways. From this posts perspective, we...
Observations/Thoughts
2026-01-14
~8 min read
togototo.wordpress.com
...It even matched the speed of GCC C, putting a lie to the statement that languages running on a VM must necessarily be slower. Many thanks to markehammons for submitting the Scala code! Although I haven’t yet learned Scala, the code is surprisingly easy to read, and isn’t...
Discussion + Blog posts
2013-07-29
~7 min read
rust-lang.github.io
...Data (such as from the network) is rarely guaranteed to be ASCII only, nor is it desirable to remove or replace non-ASCII bytes, even if ASCII-range-only operations are used. (For example, ASCII case-insensitive matching is common in HTML and CSS.)
Every single use of the Ascii...
RFC 486
RFC
2014-11-27
~3 min read
notgull.net
...Thirty-tree dependencies isn’t that bad for a highly advanced text matching
program. Most of the dependencies are things like the Rust regex engine, or
highly optimized text matching libraries.
Frankly, I can find a fairly good reason for these dependencies. Then again, it’s
a small command line...
Observations/Thoughts
2025-06-04
~7 min read