Skip to content

alexpusch/rust-magic-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9bfa9a8 · Apr 13, 2025

History

15 Commits
Apr 5, 2025
May 11, 2024
May 11, 2024
May 11, 2024
Apr 13, 2025
Apr 20, 2024
Apr 13, 2025

Repository files navigation

Rust magic patterns

The best way to learn Rust is by looking at simplified examples and building from there. Well, maybe not the best way, but this is the content of this blog repository.

"Async code is concurrent, not parallel". Have you heard this phrase about Rust/Node.js async runtimes? How about "CPU-bound code will block the async executor"? Let's investigate these claims with some code and visualizations.

The async pipeline pattern utilizes tasks and channels to concurrently process data. Lets learn about it from scratch and wrap it into a crate.

Rust Stream API is very elegant, but do you really know whats going on? Lets visualize streams and find some surprising results

Iterator API and its documentation can be a daunting for a beginner. lets learn about it by implementing a simple version

How in the world Axum manage to have methods that receive function pointers to various types of functions? What kind of black magic is this?

Additional languages