jorgeortiz.dev
...The
designers of this functionality of the Rust language decided to separate mechanism and policy, and decided to define the
Future trait in the standard library, while allowing developers to use the runtime that matches their needs for each
project. It is fair to say that tokio is the de...
Rust Walkthroughs
2025-09-17
~6 min read
hoverbear.org
...I love grep and use it with regexs all the time, but in my exploration I actually found some really interesting flags, including one that nulls out newlines for multiline matching. Crazy stuff!
multirust doesn't seem to allow you to configure where it puts the .multirust directory. While I...
Notable New Crates & Project Updates
2016-01-11
~2 min read
rustc-dev-guide.rust-lang.org
...This imposes heavy restrictions on how much we can change when LLDB's output doesn't match what we want. Some workarounds can help, but at the end of the day Rust's needs are secondary compared to making sure C and C++ compilation and debugging work correctly.
LLDB is...
Guide to Rustc Development
Book
2024-01-01
~7 min read
atilanevesoncode.wordpress.com
...Algebraic types and pattern matching. Even though I didn’t use the former.
Slices. Non-allocating views into data? Yes, please. Made the D programmer in me feel right at home.
Immutable by default. Need I say more?
Debugging. rust-gdb makes printing out values easy. I couldn’t figure...
News & Blog Posts
2015-11-16
~7 min read
redox-os.org
...Add JoinHandleExt (matching Unix version)
redox: handle multiple paths in PATH
Remove import
ruuda/thread-id
Redox support
redox-os/orbutils
Remove rustls as direct dependency
libgit2/libgit2
Convert port with htons() in p_getaddrinfo()
redox-os/website
GSoC Status Report 1
GSoC Status Report 2
GSoC Status Report 3...
News & Blog Posts
2017-08-29
~11 min read
nnethercote.github.io
...Replacing them with equivalent match expressions can help compile times.
The effects of these sorts of changes on compile times will usually be small, though occasionally they can be large. Example.
Such changes can also reduce binary size.
The Rust Performance Book
Book
2024-01-01
~2 min read
stevedonovan.github.io
...These are obviously very different types - what do they have in common?
They both match the trait bound Fn(f64)->f64. Here is a generic function
which simply invokes the closure it has been given:
fn invoke<F>(f: F, x: f64) -> f64
where F: Fn(f64)->f64 {
f(x...
News & Blog Posts
2018-09-04
~12 min read
kerkour.com
...updated_at, name, size, type, explicitly_trashed, trashed_at, namespace_id, parent_id)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)";
match sqlx::query(QUERY)
.bind(file.id)
.bind(file.created_at)
.bind(file.updated_at)
.bind(&file.name)
.bind(file.size)
.bind(&file.r#type)
.bind...
Rust Walkthroughs
2022-01-26
~6 min read
www.polymonster.co.uk
...match &info.ds_clear {
None => {
if info.discard {
depth_begin_type = D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD;
stencil_begin_type = D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD;
}
},
Some(ds_clear) => {
match &ds_clear.depth {
Some(depth) => {
depth_begin_type = D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR;
clear_depth = *depth...
Rust Walkthroughs
2022-03-02
~19 min read
github.com
...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
dev.to
...Account) -> i32 {
match account.details { //match is like case
AccountDetails::CreditCard(params) => //bind local variable params to the attached data
params.credit_limit, //in Rust, return is implicit
AccountDetails::Savings =>
0
}
}
Since both Elm and Rust don't have null values, you have to specify CreditParams when building an AccountDetails...
News & Blog Posts
2017-02-14
~17 min read
blog.benj.me
...let top11 = match alu_op {
ALUOp::Add32 => 0b00001011_000,
ALUOp::Add64 => 0b10001011_000,
};
Then decide the bits 10 to 15, based on the ALU subopcode as well.
let bit15_10 = match alu_op {
_ => 0b000000,
};
Then use an helper and pass forward the allocated physical registers
values.
sink.put4(enc_arith...
Rust Walkthroughs
2021-02-24
~25 min read
helix-editor.com
...Reflow recognizes
matching prefixes between lines, so you may reflow line-comments, markdown
quotes or lines with leading whitespace and the leading characters will be
placed appropriately.
Swap windows
--:----:--
Windows may now be swapped with neighbor windows and splits may be transposed.
With the window menu open (C-w or...
Project/Tooling Updates
2022-06-01
~3 min read
www.ersteiger.com
...RenderJob = match serde_json::from_str(message_body) { Ok(job) => job, Err(e) => { eprintln!("Failed to parse job: {}", e); continue; // Skip this message and move to the next one } }; println!("Processing job {}: template={}", job.job_id, job.template_id); // Get template from S3 let template_result = s3_client .get_object...
Rust Walkthroughs
2025-04-30
~18 min read
matklad.github.io
...Option<i32>) {
match value {
None => (),
none => (),
}
}
Syntactically, None and none are
indistinguishable. But they play quite different roles: None refers to the Option::None constant, while
none introduces a fresh binding into the scope. Swift
elegantly disambiguates the two at the syntax level, by requiring a
leading . for enum variants...
Observations/Thoughts
2022-07-13
~7 min read
dwrensha.github.io
...In #469,
@quartox updated
the implementation to use binary search,
resulting in a significant performance increase,
and matching the capnproto-c++ implementation.
This change involved add a new field to the static RawStructSchema value included
in the generated code for each Cap’n Proto type.
Project/Tooling Updates
2024-01-17
~2 min read
rust-lang.github.io
...Ok(())
}
fn main() -> () {
use std::process::exit;
use libc::{EXIT_SUCCESS, EXIT_FAILURE};
exit(match inner_main() {
Ok(_) => EXIT_SUCCESS,
Err(ref err) => {
let progname = get_program_name();
eprintln!("{}: {}\n", progname, err);
EXIT_FAILURE
}
})
}
These problems can be solved by generalizing the return type of main
and test functions.
Detailed...
Updates from Rust Core
2018-01-02
~21 min read
sixtyfps.io
...capture mutable var in Rust (ba4754)
allow FnMut as argument for
on_callback (ab7403)
Thanks to @Be-ing for the PR!
Complete the C++ Timer API (f557a2,
083ae5)
With this patch it matches the Rust API, with start(), restart(), running() and a default
constructor.
Microcontroller Support (MCU)
Make the mcu...
Research
2022-01-12
~3 min read
blog.servo.org
...Notable Additions
UK992 significantly cleaned up the Windows installer
canaltinova implemented the border-image shorthand
3442853561 added a zh-CN translation for the servo.org homepage
fitzgen added support in rust-bindgen for bindings to overloaded functions
bholley separated selector matching from property cascading when performing style calculation
manishearth added...
Other Weeklies from Rust Community
2016-11-15
~3 min read
blog.spiraldb.com
...Compression works string-by-string, and proceeds greedily, matching the longest prefix against the symbol table, and recording the corresponding code into our output array.
Figure 1 in the paper has an example of what this looks like in practice for a small URL dataset:
256 codes is a lot...
Observations/Thoughts
2024-09-11
~12 min read