www.chiark.greenend.org.uk
...syntax
"Macros by example" macro_rules!
Procedural macros proc_macro
Practicalities
build.rs
Async Rust
Introduction
Fundamentals
Innards
Practicalities
Choosing a runtime
Mixing and matching sync and async; thread context
Pin
Anonymous future types, traits, etc.
Cancellation safety
Send
Error messages
Libraries and utilities
FFI
Raw C FFI
FFI support...
Call for Participation
2021-09-08
~1 min read
github.com
...Encoding is also well optimized and is surpassing liblzma for level 0 to 3 and matches it for level 4 to 9. Data was assembled using lzma-rust2 v0.4.0 and liblzma v0.4.2. no_std Support This crate supports no_std environments by disabling the default std...
Crate
v0.26.0
2026-11-25
heikoseeberger.de
...String) { match MetadataKey::from_bytes(key.as_bytes()) { Ok(key) => match MetadataValue::try_from(&value) { Ok(value) => { self.0.insert(key, value); } Err(error) => warn!(value, error = format!("{error:#}"), "parse metadata value"), }, Err(error) => warn!(key, error = format!("{error:#}"), "parse metadata key"), } }}
With that Injector implementation we can define a...
Rust Walkthroughs
2023-08-30
~3 min read
blog.servo.org
...added support for ARM 32-bit and 64-bit cross-compiles to our CI
kichjang redesigned parts of the script event loop to better match the HTML specification’s task queue concept.
prashant made it possible to choose between EGL and OpenGLES on Linux
rebstar6 enabled click events to be...
News & Blog Posts
2016-03-21
~1 min read
crates.io
...For more information on how to use it please refer to https://containers.dev To make sure your changes match the project style you can install the pre-commit hooks with pre-commit install . This requires pre-commit to be installed on your system. License Copyright (c) 2023 Lorenzo Murarotto...
Crate
v0.17.0
2026-11-04
wasmi-labs.github.io
...Slightly slower than its direct counterpart, but has a slightly better memory footprint.Simple but efficient loop-match based instruction dispatch similar to how Wasmi 1.0 dispatch works.Ideally, it will make use of both become keyword,
and #[loop_match] attribute, once those features are stabilized. 13This is just...
Project/Tooling Updates
2025-12-03
~10 min read
slint-ui.com
...Fix some documentation links (#1575)
And add a test in the CI that checks for warnings in the internal
crates
(Also changed --exclude in the test to match the one from build, since
c++ test are run separately)
Remove erroneous mention of SLINT_FEATURE_EVENTLOOP_WINIT_ALL (#1572)
We used...
Project/Tooling Updates
2022-09-07
~4 min read
rust-lang.github.io
...p == p.join(dot)
p == dot.join(p)
p == p.root_path().unwrap_or(dot)
.join(p.relative_path())
p.relative_path() == match p.root_path() {
None => p,
Some(root) => p.path_relative_from(root).unwrap()
}
p == p.dir_path()
.join(p.file_name().unwrap_or(dot))
p == p.iter...
RFC 474
RFC
2014-11-12
~13 min read
doc.rust-lang.org
...Result<i32>) {
match result {
Ok(n) => println!("The first doubled is {}", n),
Err(e) => println!("Error: {}", e),
}
}
fn main() {
let numbers = vec!["42", "93", "18"];
let empty = vec![];
let strings = vec!["tofu", "93", "18"];
print(double_first(numbers));
print(double_first(empty));
print(double_first(strings));
}
Rust by Example
Book
2024-01-01
~1 min read
dawchihliou.github.io
...VecDeque<&mut BinaryTree<T>> = VecDeque::new();
queue.push_front(self);
loop {
let BinaryTree {
ref mut left,
ref mut right,
..
} = queue.pop_back().unwrap();
match left {
Some(node) => {
queue.push_front(node);
}
None => {
*left = Some(Box::new(BinaryTree::new(new_value)));
return;
}
}
match right {
Some(node) => {
queue.push_front(node);
}
None...
Observations/Thoughts
2022-01-19
~9 min read
docs.rs
...u64 = key.get_value("TestQWORD")?; println!("TestQWORD = {}", qword_val); key.create_subkey("sub\\key")?; hkcu.delete_subkey_all(&path)?; println!("Trying to open nonexistent key..."); hkcu.open_subkey(&path).unwrap_or_else(|e| match e.kind() { io::ErrorKind::NotFound => panic!("Key doesn't exist"), io::ErrorKind::PermissionDenied => panic!("Access denied...
Crate
v0.56.0
2026-03-14
docs.rs
...must be present and match a key in the bundle Trusted JWK metadata : explicit alg must match the token; EC curve labels and coordinate widths must match ES256/P-256 or ES384/P-384. Explicit use must be sig or jwt-svid . Explicit key_ops must be a non-null...
Crate
v0.19.0
2026-10-28
rust-java-tutorials.netlify.app
...this will collide with other impl Ridable that happen to match Bicycle
// ...
#[test]
fn take_a_ride_test(){
let mut bike = BasicBicycle::default();
bike.take_a_ride();
assert!(bike.get_speed() == 10);
}
Note that in current stable rust (version 1.5.3), looks like rust doesn't allow to define...
Observations/Thoughts
2021-07-07
~4 min read
crates.io
...Usage with Flatpak/Snap If you use Flatpak/Snap to publish your package and your Tauri identifier doesn't match the package id, set the DBUS_ID variable using the builder for the plugin, look at example. Contributing PRs accepted. Please make sure to read the Contributing Guide before making...
Crate
v2.5.5
2026-10-28
fast.github.io
...That matches a lot of failures.
But some of the nastiest problems aren’t a single line of causality. Validation can fail in five places at once. A batch operation can partially succeed. Timeouts can come with partial results. Those want something closer to a set or a tree of...
Rust Walkthroughs
2026-01-07
~9 min read
docs.rs
...By default, the member names of the struct are matched with the values in the header record of your CSV data. use std::{error::Error, io, process}; #[derive(Debug, serde::Deserialize)] struct Record { city: String, region: String, country: String, population: Option<u64>, } fn example() -> Result<(), Box<dyn Error>> { let mut...
Crate
v1.4.0
2025-10-17
jamesmcm.github.io
...Auto Ref in pattern matching
I couldn’t find an RFC for this, but it’d great to be able to use a
static &str when matching on an enum containing a String. i.e. so
this would be possible:
enum MyEnum {
WithString(String),
Other,
}
fn main() {
let myenum = MyEnum...
Call for Blog Posts
2020-09-30
~10 min read
doc.rust-lang.org
pub mod iter
...let values = vec![1, 2, 3, 4, 5];
{
let result = match IntoIterator::into_iter(values) {
mut iter => loop {
let next;
match iter.next() {
Some(val) => next = val,
None => break,
};
let x = next;
let () = { println!("{x}"); };
},
};
result
}
First, we call into_iter() on the value. Then, we match on the iterator...
module
core
Stable since 1.0.0
Version 1.100.0-nightly
rust-lang.github.io
...A pattern Foo { .. } can match more things than just the expression Foo { .. }, because the pattern matches any value of the unmentioned fields, but the expression sets them to a particular value. This means that, with the unstable inline_const_pat, the arm const { Foo { .. } } => matches less than the arm Foo...
RFC 3681
RFC
2024-08-22
~44 min read
www.ecorax.net
...u8) {
assert!(in_range(port, index));
let register = match port {
'A' => 0x0001000,
/*...*/
} as *mut u32;
*register |= 1 << index;
}
Yeah, don't do that.
Why am I bringing it up? Because now that we have some
scaffolding in the form of unique, managed Pin structs, it doesn't really seem
that...
Rust Walkthroughs
2021-04-21
~16 min read