
Pin Box and Dyn Future in Rust and Why All Three Appear
Pin<Box<dyn Future<Output = T>>> looks like noise until each word has a job. Learn why a future must be pinned, why it is boxed, why it is dyn, and how to write it with less ceremony.
The language itself: ownership, lifetimes, error handling, Serde and the idioms that make the borrow checker feel like help.

Pin<Box<dyn Future<Output = T>>> looks like noise until each word has a job. Learn why a future must be pinned, why it is boxed, why it is dyn, and how to write it with less ceremony.

Twelve Rust interview questions with answers that explain the why: ownership, borrowing, lifetimes, traits, Send and Sync, async, unsafe. Includes what a strong answer sounds like.

Ten small projects, each chosen to force one concept: ownership, traits, error handling, lifetimes, async, unsafe. Every entry names the idea, the scope and a stopping point.

Python wins on iteration speed and libraries; Rust wins on speed, memory and shipping one binary. See where each fits, and how PyO3 lets a Python project move just its hot loop to Rust.

Both give you control without a garbage collector. Rust makes memory safety the default; C++ has the larger ecosystem and decades of code. Compare safety, tooling, interop and when to stay in C++.

Go optimizes for a team shipping a service quickly; Rust optimizes for control and correctness. Compare error handling, concurrency, memory, hiring and where each language stops being the easy answer.

Box owns one heap value, Rc shares it on one thread and Arc shares it across threads. See what each costs, when you need RefCell or Mutex too, and how to choose.

A tuple struct with one field costs nothing at runtime and stops you passing a user id where an order id belongs. Learn construction, derives, Deref pitfalls and the orphan rule workaround.

Shadowing re-binds a name with let, even to a new type, while mut changes a value in place. See when each is the right tool and the one trap that surprises people.

Turn Rust structs into JSON and back with serde and serde_json, including renames, optional fields, defaults and what the parse errors look like.

Arc gives several threads shared ownership and Mutex gives them one-at-a-time access. See the full pattern, the deadlock to avoid and what poisoning means.

The panic called Option unwrap on a None value means a value you assumed was present was not. See how to find the line, and six patterns that replace the unwrap.
We send one email when a new post is published. No spam.