popzxc.github.io
Archived: primary link replaced with an archive on 2026-09-12T16:32:13.068Z (UTC; replacement date, not snapshot date)
...I remember the times when the Borrow Checker was not so friendly, when you could not simply match
on the mutable reference, and also the introduction to the concurrency was done by solving the dining philosophers problem right in the beginning of The Book.
Rust made a great progress since...
Call for Blog Posts
2020-09-30
~4 min read
dev.to
...fn main() {
tauri::AppBuilder::new()
.invoke_handler(|_webview, arg| {
use cmd::Cmd::*;
match serde_json::from_str(arg) {
Err(e) => Err(e.to_string()),
Ok(command) => {
match command {
// definitions for your custom commands from Cmd here
GetResponse {
payload,
callback,
error,
} => tauri::execute_promise(
_webview,
move || {
if payload.state != 0 {
let...
Rust Walkthroughs
2021-01-20
~40 min read
adventures.michaelfbryan.com
...c_int,
) -> c_int {
let write = (*handle).write;
let data = std::slice::from_raw_parts(data as *const u8, len as usize);
match write(handle, data) {
Ok(bytes_written) => bytes_written as c_int,
Err(e) => -e.raw_os_error().unwrap_or(1),
}
}
/// Flush this output stream, ensuring that all...
Observations/Thoughts
2020-12-16
~19 min read
jbp.io
...You might have to alter the library path to match your precise libclang-common-3.8-dev version.
Only profiling relevent code
If you pass in coverage options to a whole compilation, they will apply to everything that cargo builds and
runs during a build. This quickly fails -- every crate...
News & Blog Posts
2017-07-25
~3 min read
ferrous-systems.com
...add display hints
Thank you Sh3rm4n for contributing #300, #302 and #299!
1.3Fixes
1.3.1defmt
#310, #311 remove the runtime check (and matching tests) if the write! macro was called multiple times as this can no longer happen since write! now consumes the Formatter due to #305.
1...
Project/Tooling Updates
2020-12-23
~3 min read
rustc-dev-guide.rust-lang.org
...This flag can also be matched on, see below.
You can match on the following names and values, using name = "value":
• cause: Match against one variant of the ObligationCauseCode enum. Only "MainFunctionType" is supported.
• from_desugaring: Match against a particular variant of the DesugaringKind enum. The desugaring is identified by...
Guide to Rustc Development
Book
2024-01-01
~31 min read
timmmm.github.io
...When std is built, if the target does not match one of these whitelisted targets then the restricted_std feature is required to indicate that that build of std is not supported. I am not really sure why the whitelist does not match the logic for selecting the sys implementation...
Rust Walkthroughs
2021-04-21
~12 min read
gamedev.rs
...Wicked Potions
Match ingredients to brew wicked potions
Wicked Potions is a match-three game developed by
@nikl_me and jennifervphan for the Bored Pixels Jam 8.
They wrote the game using the Bevy game engine and created all of the
textures and audio.
The main focus of the game...
Newsletters
2021-08-10
~15 min read
jamesmunns.com
...PATH="/home/simon/projects/servo/ports/geckolib/binding_tools/rust-bindgen/target/debug:$$PATH" bindgen --no-type-renaming --match teensy3 bindings.h -o src/bindings.rs -- -I/usr/lib/clang/3.8.1/include -x c++ -std=gnu++11 -target thumbv7em-none-eabi -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US...
News & Blog Posts
2016-10-04
~3 min read
jim.turner.link
...You’ll still get a compile-time error if the dimensionality of the array/view
being sliced doesn’t match the number of arguments in the s![]
macro, and the dimensionality of the sliced array/view is still determined at
compile-time.
You may be interested in how this feature...
News & Blog Posts
2018-01-02
~3 min read
reemus.dev
...You can easily mix and match the use of cross together with cargo in your GitHub Actions workflow. Here's a simple example to demonstrate building for Linux 64-bit and Android ARM 64-bit.
name: Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
# Linux config...
Rust Walkthroughs
2023-09-20
~3 min read
rune-rs.github.io
...Other important changes
Integer types have been rename to match their rust equivalents:
byte is now named u8.
int is now named i64.
float is now named f64.
As a result of the above, some module renames have taken place:
std::int module has been renamed std::i64.
std::float...
Project/Tooling Updates
2023-10-11
~9 min read
esimmler.com
...Fill in some type annotations, log the flow of data and make sure everything matches up with your intuition.
News & Blog Posts
2019-01-22
~4 min read
llogiq.github.io
...Rust enums enjoy much attention,
well deserved, so allow me to mention
with match they enable
us to code more stable
and refactor to match our intention.
Here the main joke was the slide which showed an enum Talk { Boring(TechnicalStuff), Interesting(Rhymes) }, echoing the diss from my Rap. The...
Miscellaneous
2023-02-22
~37 min read
blog.drogue.io
...Since nothing should actually hold an Actor directly, each Actor or Interrupt is ultimately held in a matching context.
Type aliases have been used to simplify the signatures since generics are quite prevalent.
An actor has been specified for each of the two LEDs on this board, along with an...
Rust Walkthroughs
2021-02-03
~19 min read
cceckman.com
...The full code is
here,
along with the tests I used to match it against Rust’s implementation.
UPDATE: The coda
There’s some comments on this article on
lobste.rs
and Hacker News.
Several folks commented (and e-mailed!) to note that setting
-C target-cpu=x86-64-v3...
Observations/Thoughts
2025-01-22
~9 min read
fasterthanli.me
...usize) -> &'static str {
match n {
0 => "zero",
1 => "one",
2 => "two",
}
}
error[E0004]: non-exhaustive patterns: `_` not covered
--> src/main.rs:9:11
|
9 | match n {
| ^ pattern `_` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value...
Learn Standard Rust
2020-08-18
~43 min read
www.ncameron.org
...For this usage, reading might look like:use std::async::io::{Interest, Read, Ready, Result};
use std::io::ErrorKind;
async fn read_stream(stream: &TcpStream) -> Result<()> {
loop {
stream.ready(Interest::READABLE).await?;
let mut buf = [0; 1024];
let bytes_read = match stream.non_blocking_read(&mut buf) {
Ok(bytes_read...
Observations/Thoughts
2022-02-16
~15 min read
kazlauskas.me
...Following code snippet is how a correct
build.rs script might end up looking like:fn main() {
let target_os = env::var("CARGO_CFG_TARGET_OS");
match target_os.as_ref().map(|x| &**x) {
Ok("linux") | Ok("android") => println!("cargo:rustc-link-lib=dl"),
Ok...
News & Blog Posts
2017-05-16
~2 min read
slint.dev
...Keyboard Shortcuts
Handling keyboard shortcuts used to require listening for key events and manually matching key combinations.
With 1.16, we've added a dedicated KeyBinding element that makes this much simpler.
Define shortcuts declaratively in your .slint markup using the new @keys(...) macro:
export component MyApp inherits Window {
FocusScope...
Project/Tooling Updates
2026-04-22
~4 min read