
Why Tokio Spawn Needs a Static Future and How to Cope
tokio::spawn demands a future that owns its data. Learn why the compiler asks for static, what it does and does not mean, and four ways to share data with a task.
Everything you need to level up your coding skills.

tokio::spawn demands a future that owns its data. Learn why the compiler asks for static, what it does and does not mean, and four ways to share data with a task.

async and await are syntax over futures. Learn what async blocks capture, where await may appear, how errors and ? work, and the common first mistakes.

String owns its text and str is a borrowed view of text somewhere else. Use that split to pick the right type in function signatures and structs.

Every section of Cargo.toml that matters, with an example: package metadata, dependency forms, dev and build dependencies, features, targets, profiles and lints.

The handful of habits behind most Rust speed: build in release, avoid needless allocation, use iterators and slices, pick the right collection and measure before tuning.

no_std removes the standard library and leaves core. See what you lose, what core and alloc still give you, and how to write crates that work both ways.

A trait is a named set of methods a type promises to provide. See how to define one, implement it, give it default methods and use it as a bound.

Choose between Vec, VecDeque, HashMap, HashSet, BTreeMap and BTreeSet by the operations you need, with complexity, ordering and memory notes.

Install the Rust toolchain with rustup, check that it works, pick a channel and create your first Cargo project, with the three problems that stop most first installs.

Closures capture their environment, and the Fn, FnMut and FnOnce traits describe how. See which one the compiler picks and which bound to write.

A guide to Cargo beyond cargo build: the manifest, dependency versions, features, workspaces, profiles, MSRV, publishing and the errors you will meet along the way.

Iterators are lazy: adapters like map and filter do nothing until a consumer such as collect or sum runs. See the chain, the traits and the common traps.
We send one email when a new post is published. No spam.