Rust
When Not to Use Rust
I like Rust. I’ve written 9 lessons about using it in production. I think it’s one of the most well-designed languages of the last twenty …
War Stories
Every language looks great in blog posts. Production is where the truth comes out. I’ve been running Rust services in production for a few years …
Migrating Services from Go/Python/Java to Rust
I’ve been involved in three Rust migrations. One from Python, one from Go, one from Java. Two were successes. One was a disaster that got …
Feature Flags at the Type Level
We had a feature that was ready for staging but absolutely not ready for production. In my previous Go gig, we’d have used a runtime feature …
API Versioning and Backwards Compatibility
I once shipped a “minor” API change on a Friday. Renamed a JSON field from user_name to username. Seemed harmless — we were cleaning up …
Multi-Crate Workspace Architecture
Our compile times hit 8 minutes. Not from scratch — incremental. Change one line in the domain model and wait 8 minutes to see if it worked. Three …
Interpreter Pattern
A few years ago I needed to let non-technical users define filtering rules for a data pipeline. The options were: embed Lua, use a YAML config with …
CQRS and Event Sourcing
We had this inventory service that was doing fine until it wasn’t. Reads were simple — “how many units of product X are available?” …
Entity Component System
I spent years thinking about game objects the OOP way. A Player extends Character extends Entity. A Goblin extends Enemy extends Character extends …
Hexagonal Architecture in Rust
About a year ago, I had to swap out our payment provider. In Go, that would’ve been a two-week project — chasing down every place we called …
Domain Modeling with Rust's Type System
We shipped a bug to production that cost us about three hours of incident response and a very uncomfortable Slack thread. The root cause? Someone …
Middleware / Chain of Responsibility
If you’ve built anything with Express, Koa, or ASP.NET, you know middleware. A request comes in, passes through a chain of handlers — logging, …
Structuring a Large Rust Application
The moment I knew our Rust project structure was broken was when a junior engineer asked me where to put a new endpoint. I opened the repo, stared at …
Repository Pattern
Every backend developer eventually writes the same code: a function that takes a database connection, runs a query, maps the rows to a struct, and …
Factory Patterns
Here’s a hot take: most “Factory pattern” usage in Java and C# exists purely to work around limitations of constructors. …
Decorator Pattern
I remember the moment Decorator clicked for me. I was reading the source for Java’s I/O library — BufferedInputStream wrapping FileInputStream …
Command Pattern
The Command pattern has always struck me as one of those patterns that’s really just “wrap a function call in an object.” In Java, …
Observer Pattern
The Observer pattern is where Rust’s ownership model gets really opinionated. In C# or Java, Observer is simple — maintain a list of listeners, …
Strategy Pattern
In my first real Go project, I wrote an interface for a payment processor. Two implementations — Stripe and PayPal. Simple polymorphism. When I tried …
Runtime Comparison
Every few months, someone asks me “which async runtime should I use?” and every time my answer is frustrating: “it depends.” …
Builder Pattern
I once spent three days debugging a production outage caused by a builder that silently accepted a missing host field and defaulted to localhost. In …
Designing a Custom Async Runtime
A colleague once asked me, “Why would anyone build a custom async runtime when Tokio exists?” Fair question. Tokio is battle-tested, …
Work-Stealing Schedulers
I once spent two days debugging a performance issue where our Tokio application was using four cores but only one was doing any work. Three threads …
The Reactor Pattern
I read the Tokio source code on a Sunday afternoon, expecting to find something inscrutable. Layers of unsafe code, impenetrable abstractions, the …
Dependent Type Tricks
There’s a running joke in the Rust community: “Rust has a dependent type system, it just doesn’t know it.” And like most good …
epoll/kqueue
Before I understood event loops, I thought async I/O was some kind of kernel magic. You register interest in a socket, and somehow the OS tells you …
Proof Witnesses
The moment this clicked for me was when I was reviewing a crate that had a function signature like fn process(data: &[u8], _proof: …
io_uring
I ran a benchmark last year that genuinely surprised me. A simple TCP echo server using io_uring was handling 40% more connections per second than the …
Building a Minimal Executor
The moment I built my first executor from scratch, async Rust stopped being scary. Not because executors are simple — they’re not — but because …
Sealed Traits
I was designing a public API for a parser library when I realized I had a problem. I wanted users to use my trait — call its methods, pass it as a …
Future Internals
I thought I understood Rust futures until I tried to implement one without async/await. Not a toy future that immediately returns Ready. A real future …
Type-Level Programming
There’s a moment in every Rust programmer’s journey where they look at typenum or some const-generics trick and think: “Wait, …
Variance
Variance is the topic that made me realize I didn’t actually understand Rust’s type system as well as I thought I did. I’d been …
Existential Types
I used impl Trait for months thinking it was just syntactic sugar for generics. “It’s the same as a type parameter, right? Just …
Simulating Higher-Kinded Types in Rust
Every time someone on Reddit says “Rust can’t do higher-kinded types,” a part of me wants to respond with a 200-line code block that …
Session Types
I once spent three days debugging a distributed system where two services were sending messages in the wrong order. Service A expected a handshake …
Advanced Typestate
The first time I implemented a connection pool that couldn’t be misused — not through discipline or documentation, but because the compiler …
Zero-Sized Types
I remember staring at a struct definition in a library I was reading — it had a field of type PhantomData<T> and I thought, “this does …
ML Data Pipelines
Last quarter I inherited a Python data pipeline that prepared training data for our recommendation model. It processed 50 million rows. Took 3 hours. …
On-Device Inference
I run a sentiment analysis model on every support ticket that comes in. At first I used the OpenAI API — about 2 cents per ticket. Sounds cheap until …
Building MCP Servers in Rust
The first time I heard about MCP, I dismissed it as yet another protocol nobody would adopt. Then Claude Desktop shipped with MCP support, then …
Agent Architectures in Rust
I built my first “AI agent” by stuffing a system prompt into a while loop and hoping for the best. It worked — sometimes. Other times …
Reproducible Builds
A security auditor once asked me to prove that the binary running in production was actually built from the source code we claimed. I confidently ran …
Embeddings and Vector Search
I spent a week building a keyword search system for internal documentation. Regex patterns, stemming, tf-idf scoring — the whole nine yards. Then …
Tool Calling / Function Calling Patterns
Here’s something that took me embarrassingly long to internalize: LLMs don’t do things. They generate text that describes doing things. …
Linking Strategies
I deployed a Rust service to a minimal Docker container once — Alpine Linux, nothing installed except the binary. It crashed immediately with …
Streaming LLM Responses
The first time I demoed an LLM-powered feature to stakeholders, I made the rookie mistake of using non-streaming responses. The CEO asked a question, …
Monorepo Management with Workspaces
Our Rust project started as a single crate. Then we split the API handlers from the domain logic. Then we extracted shared types. Then someone added a …
Building LLM API Clients in Rust
Last month I watched a coworker’s Python script silently swallow a malformed response from the OpenAI API. The choices field came back empty, …
Code Generation
I once inherited a codebase where someone had written a Python script that generated 4,000 lines of Rust from a YAML spec. The script ran outside of …
Production Systems Software
I’ve been building systems software professionally for a while now, and here’s what I’ve noticed: the skills we’ve covered in …
Custom Lints with clippy and dylint
We had this rule on my old team: never use .unwrap() on database query results. We wrote it in our contributing guide. We mentioned it in code …
Conditional Compilation
A few months back I was debugging a test failure that only happened on our Linux CI server, never on my Mac. Turns out someone had written …
Building a Minimal Hypervisor
The first time I watched a virtual machine boot — not using VirtualBox, but running inside a hypervisor I’d written — I had the same feeling as …
build.rs
The first time I needed build.rs, I was wrapping a C library that had about 200 constants defined in a header file. I could’ve copied them all …
Writing a Bootloader
There’s something almost spiritual about writing a bootloader. Your code is the first thing that runs on a machine. Before the OS. Before any …
Cargo Deep Dive
I’d been writing Rust for about a year before I realized I was only using maybe 20% of what Cargo actually offers. cargo build, cargo run, cargo …
Interrupt Handlers and Real-Time Constraints
I once spent three days debugging a motor controller that would randomly twitch. The code was correct. The hardware was fine. The interrupt handler …
Designing Custom Allocators
Here’s a dirty secret of systems programming: malloc is not magic. It’s just code. Code that somebody wrote, code that makes tradeoffs, …
Implementing Network Protocols
I thought I understood TCP until I tried to implement it. Turns out, “client connects to server, data flows” is about 5% of the story. The …
Building a File System
The moment a file system clicked for me was when I stopped thinking of files as “things on disk” and started thinking of them as …
OS Concepts in Rust
I used to think I understood processes. Then I tried to implement fork() semantics in Rust and realized I’d been cargo-culting UNIX concepts for …
The Component Model
Here’s a scenario that actually happened to me: I had a data validation library written in Rust, a business logic layer in Go, and a reporting …
Writing Linux Kernel Modules in Rust
In December 2022, Rust officially merged into the Linux kernel source tree. Not as an experiment. Not as a sidecar. As a first-class language for …
WASI
About a year ago, I deployed a Rust function as a Cloudflare Worker using WASM. Cold start: 0.5ms. Compare that to a Lambda function in any other …
Memory-Mapped I/O
There’s a moment in every systems programmer’s life when they realize that writing to memory address 0x4002_0818 doesn’t store a …
Multi-Threaded WASM
I got a 4.2x speedup on a real-time audio processing pipeline by adding threads to my WASM module. Four threads, 4.2x faster — nearly linear scaling. …
Embedded Rust
I bricked my first development board within forty-five minutes of getting it out of the box. Wrote some C code, forgot to configure the clock …
WASM Performance
“WASM is faster than JavaScript.” I’ve heard this so many times, and it drives me nuts — not because it’s wrong, but because …
no_std
The first time I tried to compile a Rust program with #![no_std], I felt like someone had pulled the floor out from under me. No println!. No String. …
Leptos, Yew, Dioxus
After building that todo list with raw web-sys in Lesson 3, I think we can all agree: manually managing DOM nodes, closures wrapped in …
Manipulating the DOM from Rust
There’s something deeply satisfying about writing document.create_element("div") in Rust and watching it actually work in a browser. …
Soundness
A few months ago, someone filed a soundness bug against a crate I maintained. The report was elegant — three lines of safe code that triggered a …
wasm-bindgen
The first time I looked at what #[wasm_bindgen] actually generates, I was equal parts impressed and horrified. Impressed because it seamlessly bridges …
napi-rs
We had a Node.js microservice that validated JWTs. Under load, the jsonwebtoken npm package was burning 40% of CPU on RSA signature verification. I …
Rust to WebAssembly
I was optimizing a client-side image processing pipeline last year — think heavy convolutions, histogram equalization, color space conversions. The …
PyO3
I had a Python service that processed 2 million JSON records daily. Profiling showed 80% of the time was spent in one function — a custom similarity …
Exposing Rust to C
A team I was advising had a massive C codebase — about 400,000 lines of networking code. They wanted to rewrite their TLS handling in Rust but …
FFI
My first real FFI project was binding to SQLite. I thought “how hard can it be — it’s just calling C functions.” Three days later I …
Building Safe Abstractions Over Unsafe Code
The standard library’s Vec<T> contains over 50 unsafe blocks. HashMap has even more. Yet you use both every day without thinking about …
transmute
I once watched a senior engineer transmute a Vec<u8> into a Vec<u32> and couldn’t figure out why it segfaulted on ARM but worked …
Monolith-First
I’m going to tell you something that might sound weird after seven lessons about microservices patterns: don’t start with microservices. …
Dereferencing Raw Pointers Safely
A colleague once showed me a bug that took them three days to find. Their unsafe code dereferenced a pointer that was valid when created but dangling …
Raw Pointers
The first time I used raw pointers in Rust, I was porting a ring buffer from C. I’d written ring buffers in C a dozen times — head pointer, tail …
Testing Microservices
I deployed a change to the order service that renamed a field from total_amount to total_cents. Made perfect sense — cents avoid floating-point …
What unsafe Actually Means
I spent my first six months writing Rust thinking unsafe meant “this code is dangerous and you should feel bad.” That misunderstanding …
Distributed Tracing Across Services
“It’s slow” is the most useless bug report in a microservices world. Slow where? The API gateway? The order service? The database …
Service Mesh Integration
I’ll be honest — when someone first pitched “service mesh” to me, I thought it was over-engineered marketing. You’re telling …
Saga Pattern
Here’s a scenario that’ll ruin your week. A customer places an order. Your order service saves it. Your payment service charges their …
Event-Driven Architecture in Rust
The worst production incident I ever dealt with was a cascading failure triggered by a single slow database query. Service A called Service B …
Distributed System Patterns
I once watched a team spend six months building a “distributed database” that was really just PostgreSQL with a cron job that copied rows …
gRPC Microservices with tonic
The first time I used gRPC in production was on a Go project. The experience was fine — protoc generated stubs, you implemented an interface, done. …
Message Queues
The moment I stopped thinking of services as calling each other and started thinking of them as reacting to events, my architecture got dramatically …
Service Boundaries and API Contracts
I once joined a team that had 47 microservices for what was essentially a CRUD app with a payment flow. Forty-seven. Each one had its own database, …
Circuit Breakers in Rust
Picture this: your payment service depends on a fraud detection API that’s completely down. Every request to it takes 30 seconds to timeout. …
Retry Strategies and Exponential Backoff
Here’s a scenario that’s burned me more than once: a downstream service has a brief hiccup — maybe a pod is restarting, maybe …
TLS
I’ll never forget the 3am page that turned out to be an expired TLS certificate. Our automated renewal had been silently failing for two weeks, …
DNS Resolution and Custom Resolvers
A few months back, our entire staging environment went down for an hour. Not because any service crashed — because someone changed a DNS record and …
Security Fuzzing
I found a panic in a production parser by accident last year. A user in Japan sent a request with a multi-byte UTF-8 character right at a boundary …
WebSocket Servers and Clients
I built my first WebSocket server to power a live dashboard that showed deployment status across our fleet. The alternative was polling every 2 …
gRPC with tonic
The first time I used gRPC in production, I was skeptical. We already had REST APIs that worked fine — why add protobuf compilation, code generation, …
Sandboxing and Privilege Dropping
Here’s a pattern I’ve seen too many times: a Rust web service runs as root in a Docker container because “it needs to bind port …
HTTP Clients
I once spent three hours debugging a production issue that turned out to be an HTTP client with no timeout configured. Three hours. The client was …
Supply Chain Security
The xz backdoor was a wake-up call for the entire industry, but honestly, supply chain attacks had been happening for years before that — just more …
Building a TCP Server from Scratch
Last month I was debugging a flaky microservice at work and realized I couldn’t explain what was actually happening between bind() and the first …
Dependency Auditing
You know what keeps me up at night? Not my own code — I can review that. It’s the 200+ transitive dependencies in my Cargo.lock that I’ve …
Release Profiles and Build Optimization
I was benchmarking two builds of the same service — one with default release settings, one with a tuned profile. Same code. Same hardware. The tuned …
Secret Management
A while back I was debugging a crash in production and pulled a core dump from the server. Sitting right there in the heap, in plain text, was a …
Cryptography
I’m going to say something controversial: most developers should never write cryptographic code. Not because they’re not smart enough — …
Configuration
I once shipped a service to production with the staging database URL hardcoded. Not in an environment variable — literally in the source code, in a …
Input Validation and Sanitization
A few months ago, I was reviewing a PR where someone had written a REST API handler that took a user-supplied filename, appended it to a base path, …
Graceful Shutdown
I deployed a new version of a payment service once, and for about 3 seconds during the rollout, a handful of transactions just… vanished. They …
Memory Safety
Last year I inherited a C++ service that had been “battle-tested” in production for three years. Within a week of digging through crash …
Health Checks and Readiness Probes
A service I maintained once passed all its health checks while silently dropping 30% of incoming requests. The health endpoint returned 200 OK every …
Observability
I once spent six hours debugging a production issue where requests were randomly timing out. No errors in the logs. CPU and memory looked fine. …
CI/CD for Rust
My first Rust CI pipeline took 45 minutes. Forty-five. Every push triggered a full dependency build, tests ran sequentially, and clippy ran as a …
Using unsafe to Escape the Borrow Checker
I found this in a production codebase: fn get_or_insert(&mut self, key: &str) -> &mut Value { if !self.map.contains_key(key) { …
Static Linking with musl
Last year I had to deploy a Rust service to a hardened environment — no package manager, no shared libraries, no internet access. Just a bare Linux …
Macro Abuse
I spent an entire afternoon debugging a test failure that turned out to be caused by a macro expanding variable names in a way I didn’t expect. …
Docker for Rust
The first time I shipped a Rust service in Docker, my image was 2.1 GB. Two. Point. One. Gigabytes. For a binary that was 8 MB. I’d used …
Premature Optimization
A teammate once spent three days replacing every String in our data model with a custom arena-allocated string type. The rationale: “String …
Arc<Mutex<T>> as Default
There’s a specific moment in every Rust developer’s journey where they discover Arc<Mutex<T>> and start putting everything in …
Trait Bloat
I worked on a project that had a Storage trait with twenty-three methods. Twenty-three. It handled reading, writing, deleting, listing, searching, …
Over-Genericizing
I reviewed a library last year where the author had made literally everything generic. The HTTP client was generic over the transport, the serializer, …
Zero-Copy Parsing
I once had to parse 2GB of log files per hour on a machine with 4GB of RAM. The naive approach — read line, split into fields, store as String — …
God Structs
I once opened a file called app.rs and found a struct with forty-two fields. Forty-two. It held the database connection, the HTTP client, the cache …
Stringly Typed APIs
I inherited a Rust codebase once where the entire state machine was driven by string comparisons. The order status could be "pending", …
unwrap() in Production
A service I was responsible for went down at 2 AM on a Saturday because of a single .unwrap() call on line 847 of a file nobody had touched in months. …
Binary Size Reduction
I shipped a “hello world” Rust binary to a team once and they came back confused: “Why is this 4 megabytes?” Fair question. A …
.clone() Everywhere
I was reviewing a pull request last year from a developer who’d been writing Rust for about three months. The code compiled. The tests passed. …
Compile Time Optimization
My main Rust project at work took 4 minutes and 38 seconds for a clean build. That was two years ago. Today it takes 52 seconds. Same codebase — more …
Inlining
A few years ago I was profiling a JSON parser and noticed something weird. A tiny function — four lines, no allocations — was showing up as a 15% hot …
Cache-Friendly Data Structures
Here’s a number that should change how you think about data structures: reading from L1 cache takes about 1 nanosecond. Reading from main memory …
Choosing the Right Collection
A friend asked me to review their service that was doing “thousands of lookups per second” against a Vec of about 50,000 entries. Linear …
String Performance
I was building an in-memory index that stored about 2 million tag strings. Most were short — “rust”, “go”, “api”, …
Iterators vs Loops
When I first started writing Rust, I wrote everything as for loops. Old habits from C. Then someone on my team rewrote one of my loops as an iterator …
How rustc Works
A junior on my team once asked why Rust compiles so slowly compared to Go. I gave the standard answer about monomorphization and LLVM, but realized I …
Reducing Allocations
I profiled a Rust web service once and found it was allocating 47,000 times per request. Forty-seven thousand. Most were tiny — 16-byte strings, …
Profiling
A colleague once asked me to look at a Rust service that was “slow.” They’d already spent a week trying to optimize the JSON parsing …
Miri
I once shipped a Rust library with an unsafe block that worked perfectly on x86, passed all tests, and ran flawlessly in production for months. Then …
Benchmarking with criterion and divan
Last year I reviewed a PR where someone claimed their new serialization code was “2x faster.” Their benchmark? std::time::Instant::now() …
Custom Allocators
I was building a JSON parser that processed millions of small documents per second. Profiling showed that 40% of the time was spent in malloc and free …
Performance Philosophy
I once spent three days rewriting a hot loop to avoid a single allocation per iteration. Hand-rolled a custom arena, eliminated two clones, even …
Drop Order
I once had a deadlock in a Rust program that only manifested during shutdown. A mutex guard and a database connection were being dropped in the wrong …
repr(C), repr(transparent), repr(packed)
The first time I wrote Rust FFI bindings to a C library, I defined a struct, passed it across the boundary, and got garbage data back. The C side was …
Fat Pointers
I remember being confused why &str was 16 bytes on a 64-bit system. A pointer is 8 bytes — what’s the other 8? That question sent me down a …
vtables
I was profiling a parser once and found that a hot path using dyn Iterator was 3x slower than the equivalent code using generics. The algorithm was …
Box
When I first started writing Rust, I used Box everywhere. Came from a Java background where everything lives on the heap, and wrapping things in Box …
Macro Anti-Patterns
I once worked on a codebase where someone had written a macro for everything. Creating structs? Macro. Implementing a two-line function? Macro. …
Stack vs Heap
A colleague once asked me why their Rust program was ten times slower than expected. They were allocating a Vec<u8> inside a tight loop — …
Real-World Macro Patterns
I used #[derive(Serialize)] for two years before I actually looked at what it generates. When I finally ran cargo expand on a struct with five fields, …
Memory Layout
I spent an embarrassing amount of time debugging a networking project where my hand-crafted packet structs were mysteriously three bytes too large. …
syn and quote
Every time I write a proc macro without syn and quote, I regret it within twenty minutes. Raw TokenStream manipulation is like writing HTML by …
Function-Like Proc Macros
A colleague once asked me why sqlx::query!("SELECT * FROM users WHERE id = $1") can catch SQL errors at compile time. “Is it reading …
Attribute Macros
I was reviewing a codebase that used Actix Web and kept seeing #[get("/users")] on handler functions. I knew it was a macro, but I …
Derive Macros
The first derive macro I shipped to production generated about 200 lines of boilerplate per struct. We had 47 structs. That’s 9,400 lines of …
Procedural Macros
The moment I realized macro_rules! couldn’t generate new identifier names from captured inputs, I knew I needed something more powerful. I was …
Debugging Macros
You will write a macro that compiles, runs, and produces the wrong output. You’ll stare at the macro definition, convinced it’s correct. …
Production Async Architecture
This is the lesson that ties everything together. Over the last 19 lessons, we’ve built up from mental models to executors, from channels to …
Macro Hygiene
I once spent an embarrassing amount of time debugging a macro that worked perfectly in one file and broke in another. Same macro, same input, …
Testing Async Code
Async code is harder to test than sync code. Not because the logic is more complex, but because time, I/O, and concurrency introduce non-determinism. …
Macro Pattern Matching
There’s a point when writing declarative macros where the syntax stops feeling like Rust and starts feeling like regex for code. You’re …
Tracing Async Code
Debugging async code with println! is like debugging a highway pileup by asking each car individually what happened. You get disconnected fragments — …
Declarative Macros
The first macro I ever wrote was a disaster. I wanted a shorthand for creating HashMaps — something like map!{ "a" => 1, "b" …
Pin in Async Context
I’ve been hand-waving around Pin for 16 lessons. Every time we saw Pin<&mut Self> in a poll method, I said “don’t worry …
Why Macros
I spent three hours once writing nearly identical impl blocks for sixteen different numeric types. Copy, paste, change i32 to i64, change i64 to u32, …
How Async Executors Work Under the Hood
There’s a moment in every async Rust developer’s journey where the runtime stops being a black box and starts being a machine you …
Backpressure
The fastest way to kill a production service is to accept work faster than you can process it. I learned this the hard way when a log ingestion …
Tower
I avoided Tower for months. The trait bounds looked terrifying, the documentation assumed you already knew what you were doing, and I couldn’t …
Building HTTP Clients with reqwest
Almost every backend service I’ve built makes HTTP calls to something — a third-party API, another microservice, a webhook endpoint. And almost …
Async I/O
Here’s an uncomfortable truth about async file I/O: on most operating systems, it doesn’t really exist. When you call …
Timeouts, Deadlines, and Graceful Shutdown
Every production outage I’ve investigated boils down to one of two things: unbounded retries or missing timeouts. A function that “usually …
Cancellation Safety
This is the lesson I wish someone had shoved in my face before I wrote my first select! loop. I lost three days to a bug where messages were …
Semaphores and Rate Limiting
I once crashed a third-party API by spawning 10,000 concurrent requests from an async Rust service. The code was correct — every request completed …
Async Mutexes
“Should I use tokio::sync::Mutex or std::sync::Mutex in async code?” I’ve seen this question in every Rust Discord server, every …
Async Channels
The first real async service I built had a classic architecture: an HTTP handler receives a request, puts work on a queue, a background worker …
Streams
Regular iterators give you one value at a time, synchronously. Futures give you one value, asynchronously. Streams give you multiple values, …
tokio::select!
A couple months ago I was building a WebSocket handler that needed to do three things simultaneously: read from the socket, check a shutdown signal, …
Spawning Tasks and JoinHandles
I remember the exact moment async Rust “clicked” for me. I was building an API aggregator that needed to call five different services. My …
Tokio
Every async Rust tutorial shows you #[tokio::main] in the first example and then moves on like that’s totally self-explanatory. It’s not. …
The Future Trait
After I understood the mental model from lesson 1, my next question was obvious: what happens mechanically when I write .await? I could accept …
Async Mental Model
I spent three weeks writing async Rust code that compiled, ran, and produced correct results — while having absolutely no idea what was actually …
Production Concurrency Architecture
After 24 lessons of building blocks, let’s talk about how they compose in real systems. I’ve shipped concurrent Rust services handling …
Testing Concurrent Code
I spent a full week writing tests for a lock-free queue. Ran them a thousand times — all green. Shipped it. Two days later, a production crash. A race …
GPU Computing from Rust
The first time I ran a matrix multiplication on a GPU, my jaw dropped. A computation that took 8 seconds on an 8-core CPU finished in 40 milliseconds …
SIMD
I had an image processing pipeline that took 4.2 seconds per frame on a single core. After rewriting the hot loop with SIMD intrinsics, it dropped to …
CSP-Style Concurrency
Before I wrote Rust full-time, I spent two years writing Go. The goroutine-plus-channel model gets into your brain. You start thinking about problems …
The Actor Model with Rust
The first time I saw Erlang’s actor model, I thought it was over-engineered. Every piece of state behind a process, every interaction a message. …
Thread-Local Storage
I was optimizing a JSON serializer that allocated a buffer for every call. Under profiling, those allocations were 30% of the cost. The fix? A …
Debugging Deadlocks and Data Races
The worst deadlock I ever encountered wasn’t between two mutexes. It was between a mutex and a channel. Thread A held a lock and tried to send …
Lock-Free Data Structures in Rust
A few years ago I was profiling a metrics collection service and found that 60% of the CPU time was spent on mutex contention. Thirty-two threads, one …
Barriers and Once
I was building a benchmark suite once — eight threads, each measuring throughput of a different operation. The problem was that threads started at …
Condvar
Early in my career, I wrote a producer-consumer queue using a mutex and a busy-wait loop. The consumer would lock the mutex, check if there’s …
parking_lot
I switched a high-contention service from std::sync::Mutex to parking_lot::Mutex and saw lock acquisition time drop by 30% under load. The API is …
Fan-Out Fan-In in Rust
One of the most satisfying architectures I’ve built was a real-time analytics pipeline. Events came in through a single ingestion point, fanned …
Worker Pool Patterns
I blew up a production database once by spawning unlimited concurrent connections. A batch job that normally processed 100 items suddenly got 50,000. …
Crossbeam
Before Rust 1.63 added thread::scope to the standard library, crossbeam was the only ergonomic way to spawn threads that could borrow local data. Even …
Rayon
I had a batch processing job — reading 50,000 JSON files, parsing them, running validation, writing results. Single-threaded, it took 12 minutes. I …
Send and Sync
There’s a moment in every Rust developer’s life when they try to send an Rc<RefCell<Vec<String>>> to another thread and …
Memory Ordering
Memory ordering is the thing that separates people who use concurrent code from people who write concurrent primitives. I avoided understanding it for …
Atomics
I once replaced a Mutex<u64> counter in a hot path with an AtomicU64 and saw throughput jump 40%. Not because mutexes are slow — they’re …
Arc<Mutex<T>>
I remember staring at Arc<Mutex<HashMap<String, Vec<u8>>>> in a codebase and thinking “this is the ugliest type …
Shared State
The nastiest production bug I ever tracked down involved a Java ConcurrentHashMap that was “thread-safe” in the API sense but not in the …
Channels
The first concurrent system I built that actually worked well was a log aggregation pipeline. Multiple producers writing log lines, one consumer …
Redis, MongoDB, and Non-Relational Stores
I spent a week optimizing a Postgres query that powered a leaderboard. It involved a complex window function over millions of rows, and no amount of …
move Closures
When I first started writing threaded Rust code, I hit the same compiler error about forty times in one afternoon. Something about closures borrowing …
std::thread
A few years back I was reviewing a Go service that spawned goroutines like confetti at a parade — hundreds of them, no tracking, no lifecycle …
N+1 Queries, Indexes, and EXPLAIN
A coworker asked me to look at an endpoint that was taking 8 seconds to return 50 orders. The table had 200K rows — not big by any standard. I opened …
Why Rust Concurrency Is "Fearless"
I once spent three days chasing a race condition in a Java service that only manifested under production load. The bug? Two threads updating a shared …
Testing with Real Databases
I spent two days debugging a production issue where a query returned duplicate rows. The unit tests all passed — every mock returned exactly the …
Building Type-Safe Query Builders
I was reviewing a PR that had a search endpoint with 12 optional filters. The handler was a 200-line function full of if let Some(...) blocks, each …
The Repository Pattern in Rust
I once inherited a codebase where every HTTP handler had raw SQL queries inline — sqlx::query! calls scattered through 80+ route handlers. Changing a …
Transactions and Error Rollback
A payment service I worked on had a subtle bug: it deducted money from the user’s wallet, then tried to create an order record. If the order …
Production Deployment
Shipping to production is where the real education begins. Your local dev environment is a controlled fantasy — one instance, no load balancer, fast …
Schema Migrations in Rust Projects
A teammate once ran ALTER TABLE orders DROP COLUMN status on the production database because he’d tested it locally and “it worked …
Integration Testing HTTP Services
I worked on a codebase that had 600 unit tests with mocked HTTP clients, mocked databases, mocked everything. All 600 passed. The application …
Connection Pooling with deadpool and bb8
I once watched a Rust service fall over under modest load — maybe 200 concurrent requests — because every request opened a new Postgres connection, …
Diesel
I was two weeks into a project where I had to write about 40 CRUD endpoints for an admin panel. Each one needed the same pattern: validate input, …
OpenAPI / Swagger Generation
I’ve never seen a team maintain a separate OpenAPI spec in sync with their actual API for more than three months. Someone adds a field, forgets …
SQLx
I shipped a typo in a SQL column name to production last year. The column was user_nme instead of user_name. The Go service compiled fine, the tests …
Rate Limiting and Throttling
We launched a public API without rate limiting. Within a week, a single user was making 200 requests per second — not maliciously, just a badly …
WebSockets with Axum
A startup I consulted for was polling their REST API every 500 milliseconds to check for new messages. Forty thousand clients, each making two …
Pagination, Filtering, and Sorting
We shipped a “list all orders” endpoint that returned everything. No pagination. Worked great in development with 50 test records. In …
Database Integration
My first Rust web service leaked database connections. I opened a new connection per request and forgot that Rust’s ownership system …
Authentication
I’ve reviewed auth implementations at four different companies. Three of them stored passwords in SHA-256 without salting. One stored them in …
Conversion Traits
I used to litter my Rust code with .to_string(), as, and manual conversion functions everywhere. Then I learned the conversion traits properly and my …
Request Validation and Error Responses
A junior engineer on my team once deployed an endpoint that accepted any string as an email address. Someone submitted “lol” as their …
Middleware with Tower Layers
I once inherited a Node.js codebase with 23 Express middleware functions chained together. Half of them silently swallowed errors, three of them …
std::sync
I shipped a data race to production exactly once. Go program, shared map, no lock. Took three weeks to reproduce — only happened under heavy load when …
Axum from Zero
The first time I tried Axum, I wrote a handler that took five extractor arguments and spent twenty minutes staring at a compiler error that said my …
The Rust Web Landscape
I spent three weeks building a service in Actix-web before ripping it out and switching to Axum. Not because Actix was bad — it’s genuinely fast …
std::time
A few months ago I tracked down a bug where a cache TTL check was wrong because someone compared SystemTime values that had been serialized and …
std::process
I once wrote a deployment script in Bash that grew to 800 lines with nested conditionals, string interpolation bugs, and error handling that amounted …
std::net
The first network program I ever wrote — a chat server in college — had a bug where it would block forever waiting for one client’s message …
std::fmt
I once shipped a monitoring dashboard where all the latency values showed up as “Duration { secs: 0, nanos: 234000000 }” because I’d …
Testing CLI Applications
I shipped a CLI tool with 100% unit test coverage on the core logic. Users immediately found three bugs. The argument parser accepted --port but the …
std::fs and std::path
A colleague once deployed a script that used string concatenation for file paths: dir + "/" + filename. Worked perfectly on Linux, blew up …
std::io
Early in my Rust journey, I wrote a log parser that read a 2GB file byte by byte using read() without buffering. It took forty minutes. Adding a …
Building TUIs with ratatui
I was monitoring a deployment through five separate terminal windows — one for logs, one for metrics, one for the deployment status, one for the …
Iterator Trait and Adapters
The moment Rust iterators clicked for me was when I realized they’re not loops with extra steps — they’re a completely different way of …
Distribution
I built a CLI tool that three teams at work used daily. It lived in a shared directory on an NFS mount. Every time I pushed an update, I’d post …
Collections Deep Dive
I spent two days debugging a performance cliff in a data pipeline — turns out I’d been using a HashMap where a BTreeMap would’ve cut …
Cross-Compilation for Linux, Mac, Windows
First time I tried to cross-compile a Rust binary from my Mac to Linux, I ran cargo build --target x86_64-unknown-linux-gnu and got hit with a wall of …
Subcommands and Complex CLI Structures
Every tool starts as mytool --flag input.txt. Then someone asks for a second mode. Then a third. Before you know it, you have mytool --mode=convert …
Signal Handling and Graceful Shutdown
I had a CLI tool that converted video files. Big ones — 10, 20 gigabytes each. The conversion created a temp file, wrote the converted output there, …
Test Architecture
I inherited a Rust project with 800 tests. Running them took 45 minutes. I dug in and found: 600 unit tests that mocked every dependency (most tested …
Colored Output and Progress Bars
I used to think terminal output was either plain text or ANSI escape code soup. Then I looked at how tools like cargo, ripgrep, and bat handle their …
Testing in CI
I merged a PR last year that passed all tests on my M2 MacBook and broke on the Linux CI runner. The issue? I’d used std::path::PathBuf with …
Configuration Files and Environment Variables
I shipped a CLI tool with 23 flags once. Twenty-three. The --help output scrolled past two terminal screens. Users hated it, nobody could remember the …
stdin, stdout, stderr
A coworker once asked me to review a Rust CLI they’d written. It read a CSV file, transformed some columns, and wrote the result. Worked …
Benchmarking with criterion
I once optimized a hot loop by replacing a HashMap lookup with a Vec indexed by a precomputed key. Felt clever. Ran the benchmarks. The …
clap
I’ve written argument parsers by hand in four different languages. Every single time, I ended up with a tangled mess of string matching, edge …
Code Coverage
I worked on a team that had a strict “90% code coverage” policy. Every PR had to hit that number or it got rejected. The result? People …
Snapshot Testing with insta
I refactored a code formatter once — changed how it handles indentation for nested blocks. I had assertions checking specific outputs for five test …
Fuzz Testing with cargo-fuzz
A friend of mine maintains a binary parser in Rust. It had hundreds of unit tests, property tests, the works. He ran a fuzzer against it on a Friday …
Property-Based Testing with proptest
I wrote a URL parser once. Had fifty hand-crafted test cases. All green. Pushed to production. Within a week, a user sent a URL with a percent-encoded …
Mocking
I spent an embarrassing amount of time early in my Rust journey trying to mock a database connection by hand. I built a fake struct, implemented the …
Test Fixtures and Setup/Teardown
I had a test file last year where every single test started with the same twelve lines of setup — creating a database connection, inserting seed data, …
Doc Tests
I once read the docs for a popular Rust crate, copied the example verbatim, and it didn’t compile. The API had changed two versions ago but …
Integration Tests
A colleague once reviewed one of my Rust libraries and said, “Your unit tests pass, but I can’t actually use the crate — the public API …
Unit Tests
I shipped a Rust library last year that had zero tests. Not because I’m lazy — I was prototyping, moving fast, “I’ll add tests …
Refutable vs Irrefutable Patterns
I remember the first time the Rust compiler told me “refutable pattern in local binding.” I stared at the error for five minutes, Googled …
The Visitor Pattern via Enums
I spent a week once trying to make trait objects work for an AST walker. Every new operation meant a new trait, a new impl block for every node type, …
State Machines with Enums
Three years ago, I debugged a payment processing system where an order could go from “refunded” back to “shipped.” Nobody …
Enums Carrying Data
The worst bug I ever shipped came from a status field that was a string. It could be “active”, “Active”, “ACTIVE”, …
Production Error Architecture
I shipped a Rust service to production once with great error types, proper Result propagation, context chains — the whole nine yards. And then I …
Or Patterns, @ Bindings, and Rest Patterns
I was reviewing a PR last year where someone had written twelve match arms for an enum — four groups of three variants that all did the same thing. …
Match Guards and Bindings
A few months back I was writing a rate limiter. The logic was simple: if the request is from an internal IP and the rate is under the limit, allow it. …
panic!, unwrap, expect
There’s a pervasive myth in the Rust community that unwrap() is always bad. I’ve seen code reviews where people mechanically replace every …
Destructuring
I used to write code like point.x, point.y, point.z over and over in the same function. Three fields, three accesses, repeated twelve times. Then I …
Adding Context
Picture this: it’s 2 AM, your pager goes off, and the log says "connection refused". Connection to what? From where? During which …
match
I shipped a Python service once that had a match statement handling four message types. Three months later, the team added a fifth type. Nobody …
Library vs Application Error Strategy
I learned this the hard way. I was building a parsing library and used anyhow::Error as my error type in all public functions. A user opened an issue: …
anyhow
There’s a dirty secret in Rust error handling: half the time, you don’t actually need typed errors. You need errors that are easy to …
thiserror
After writing my third custom error type by hand — with the Display impl, the Error impl, the From impls — I thought, “there has to be a better …
GATs
GATs (Generic Associated Types) took seven years from proposal to stabilization. That’s not because Rust’s team is slow — it’s …
Designing Custom Error Types
I once worked on a project where every error was Box<dyn std::error::Error>. Debugging was miserable. When something failed in production, the …
Const Generics
Before const generics landed (Rust 1.51), working with arrays was painful. You couldn’t write a function that accepted [T; N] for any N. The …
The ? Operator
Before the ? operator existed, Rust had try!() — a macro that did the same thing but looked ugly and nested poorly. When ? landed in Rust 1.13, it was …
Monomorphization
“Zero-cost abstractions” is Rust’s battle cry. But what does that actually mean for generics? How does Vec<i32> and …
Result and Option
When I first started writing Rust, I used match on every single Result and Option. My code looked like a staircase — match inside match inside match, …
Rust's Error Philosophy
I spent three years writing Java before I touched Rust. In Java, any function call might throw an exception — checked, unchecked, runtime, whatever. …
Operator Overloading with Traits
I was building a linear algebra library and got tired of writing vector_a.add(&vector_b) everywhere. It looked ugly. It read poorly. Math should …
Essential Std Traits
There’s a tier list of Rust traits. Some you’ll implement once in your career. Some you’ll implement weekly. And then there are the …
Orphan Rules and the Newtype Workaround
Picture this: you’re using two crates — serde and some db_client crate. You want to implement serde::Serialize for db_client::Row. Sounds …
Blanket Implementations
The moment blanket implementations clicked for me, I felt like I’d been handed a cheat code. You write impl<T: Display> ToString for T and …
Object Safety
The first time I got the error “the trait Clone cannot be made into an object,” I stared at it for a solid minute. Clone is one of the …
dyn Trait
Every Rust programmer hits this wall eventually. You have a Vec and you want to put different types in it — all implementing the same trait, but …
Supertraits
I had a trait called Serialize (homebrew, pre-serde days) that needed to format things as strings. I kept calling .to_string() inside default methods …
Associated Types vs Generic Parameters
Here’s a question that confused me for months: why does Iterator use an associated type (type Item) instead of a generic parameter …
When You're Fighting the Borrow Checker
Every Rust developer has been there. You’re implementing something that feels simple. It works in your head. But the borrow checker says no. You …
where Clauses
You know that moment when a function signature gets so long it wraps three times in your editor and you can’t even find the return type? I hit …
Trait Bounds
I once wrote a generic function that looked perfectly reasonable — accepted any T, did some work, returned a result. It compiled. Then I tried to …
Pin and Unpin
Pin is the concept that makes experienced Rust developers pause. Not because it’s inherently complex — it’s actually a pretty small API — …
Default Implementations and Selective Overrides
Here’s something that bugged me when I first started with traits: I had six different types all implementing the same trait, and five of them …
Trait Fundamentals
I spent my first month in Rust writing impl blocks that looked suspiciously like Java interfaces. Copy-paste, copy-paste, tweak one method, ship it. …
Weak References
Reference counting has a fatal flaw: cycles. If A owns B and B owns A, neither reference count hits zero. The memory is leaked — not freed when it …
Rc and Arc
Rust’s ownership model says every value has one owner. But what happens when multiple parts of your program genuinely need to own the same data? …
Interior Mutability
Rust’s borrowing rules say you can’t mutate through a shared reference. Period. Except — sometimes you need to. Caching, reference …
Self-Referential Structs
Every Rust developer eventually tries to build this: a struct that owns some data AND holds a reference into that data. It seems perfectly reasonable. …
Higher-Ranked Trait Bounds
If regular lifetime annotations are Rust’s intermediate boss, for<'a> is the final boss. Higher-Ranked Trait Bounds (HRTBs) look …
'static
'static is the most misunderstood lifetime in Rust. Most people think it means “lives forever” or “global variable.” It kind …
Lifetimes in Structs
Putting a reference inside a struct is where lifetimes go from “mildly confusing” to “wait, what?” for most people. I remember …
Lifetime Elision Rules
If lifetimes are so important, why don’t you see 'a plastered all over most Rust code? Because the compiler is smart enough to figure it out 90% …
Lifetime Annotations
Lifetime annotations are where most people’s Rust learning hits a wall. The syntax looks alien. The error messages talk about “named …
When to Reach for unsafe
This is the lesson I almost didn’t write. Not because unsafe is hard to explain, but because most Rust developers will never need it — and I …
The Borrow Checker
I used to think the borrow checker was my enemy. It rejected valid programs! It made simple things hard! It was too conservative! Then I started …
Writing Great Rust Documentation
The Rust ecosystem has some of the best documentation I’ve seen in any language. And it’s not an accident — the tooling actively …
Copy vs Clone
A coworker once asked me: “If Rust moves everything, how do I ever use a value twice?” Fair question. The answer is two traits that look …
Clippy Is Your Mentor
I’ll say something controversial: Clippy taught me more about idiomatic Rust than any book. Not because it explains concepts — it doesn’t. …
Move Semantics
The first time Rust told me I couldn’t use a variable after assigning it to another one, I stared at my screen for a solid minute. In what …
Feature Flags and Conditional Compilation
I once worked on a crate that pulled in 200+ transitive dependencies because it unconditionally depended on tokio, serde, reqwest, and tracing. Most …
The Mental Model
I spent my first three months in Rust confused about ownership. Not because the concept is hard — it’s genuinely simple — but because every …
The Turbofish ::<>
The first time I saw ::<> in Rust code, I thought someone was having a stroke at the keyboard. collect::<Vec<_>>()? What is that …
API Design Guidelines
I’ve written APIs in a dozen languages, and Rust is the only one where the community has near-universal agreement on how APIs should look. …
PhantomData
When I first saw PhantomData in a codebase, I thought it was some kind of hack. A zero-sized field that exists only to satisfy the compiler? It felt …
Drop and RAII
In Go, you write defer f.Close() and hope you didn’t forget one. In Python, you use with blocks and hope the context manager is implemented …
Zero-Cost Abstractions
“Zero-cost abstractions” is Rust’s most-repeated promise and its most-misunderstood concept. People hear “zero cost” and …
Enums Over Booleans
I once spent an entire afternoon debugging a function with this signature: process(data, true, false, true). Three booleans. What did they mean? I had …
Exhaustive Matching
A teammate once added a new payment method to our system — CryptoCurrency — and forgot to update the fee calculation logic. In production. For three …
derive Is Your Best Friend
I review a lot of Rust code, and one of my biggest pet peeves is types without #[derive(Debug)]. You hit an error, you try to print the value, and you …
Display and Debug
Pop quiz: what’s the difference between {} and {:?} in a println!? If your answer is “one looks prettier,” you’re not wrong — …
Designing Error Types
I’ve seen two extremes in Rust error handling. On one end: Box<dyn std::error::Error> everywhere, a stringly-typed mess where you …
Cow
There’s a function signature dilemma that every Rust developer hits: should this function return &str or String? If you return &str, you …
Deref Coercion
Here’s something that confused me for weeks when I started Rust: I’d write a function that takes &str, and I could pass it a …
From and Into
The first time I saw .into() in Rust code, I was baffled. “Into what?” There was no type annotation, no explicit conversion function, just …
The Builder Pattern in Rust
Every Rust dev eventually runs into the “struct with 12 fields” problem. You’ve got a configuration type. Some fields are required, …
The Newtype Pattern
True story: a Mars orbiter was lost because one team used pounds and another used newtons. Same numeric type, different semantic meanings. $327 …
The Typestate Pattern
I once spent two days debugging a production issue where someone called .send() on an HTTP request builder before setting the URL. The code compiled …
Where to Go from Here
You’ve made it through 24 lessons. You understand ownership, borrowing, structs, enums, traits, generics, error handling, closures, iterators, …
Iterator Chains Over Manual Loops
I used to write Rust like I was still writing C — for loops everywhere, mutable accumulators, index variables. The code worked, but it was loud. Five …
Reading and Writing Files
Every tutorial teaches you to manipulate data in memory, but real programs read from files and write to files. Rust’s file I/O is built on the …
if let and while let
There’s a special kind of code smell that I call “match bloat” — when you write a six-line match statement to handle a single …
Option and Result Are Your Control Flow
I once inherited a C codebase where -1 meant “not found,” 0 meant “error,” and NULL meant… well, it depended on the …
Writing Your First Tests
I have a rule: I won’t merge code without tests. Not because I’m a purist — because I’ve been burned too many times. Rust makes …
Borrow Strategically
A colleague once showed me their Rust code where every function parameter was String — never &str, never &String. When I asked why, they said …
Iterators
I once profiled a Go service and found it was spending 40% of CPU time allocating intermediate slices in a data pipeline. Each transformation created …
Closures
Closures are where Rust stops feeling like a systems language and starts feeling like a functional one. You’ve already been using them — every …
Think in Ownership
I spent three months fighting the borrow checker before I realized the problem wasn’t the borrow checker — it was me. I kept thinking in C++ …
Generics
I used to think generics were fancy academic stuff that you’d rarely need in practice. Then I wrote my third function that was identical to a …
Traits
Traits are the mechanism I miss most when I leave Rust. They’re interfaces without inheritance, type classes without the math, and the …
Crates, Cargo.toml, and Dependencies
The first time I added a dependency in Rust, I was shocked. Add one line to Cargo.toml, run cargo build, and it downloads, compiles, and links …
Modules
Rust’s module system confused me for longer than I’d like to admit. I came from Go, where packages map directly to directories. …
Result and the ? Operator
Exception-based error handling has a fundamental flaw: you can’t tell by looking at a function signature whether it might throw. Go fixed this …
Vec, HashMap, and HashSet
In my experience, about 80% of all data structures in real programs are either lists or key-value maps. Rust nails both of them. Vec and HashMap are …
Methods and Associated Functions
In most object-oriented languages, data and behavior are bundled together inside classes. Rust separates them — you define data with struct (or enum) …
Pattern Matching
Pattern matching ruined switch statements for me. After using match in Rust for a few months, going back to C-style switch/case feels like using a …
Enums and Option
Tony Hoare called null his “billion-dollar mistake.” He invented it in 1965 and has publicly apologized for it multiple times since. Rust …
Structs
I worked on a Go codebase once where someone had passed around a map[string]interface{} for user data. It was fine until someone misspelled …
Strings
Strings are the #1 source of confusion for Rust beginners. I see the same questions every week: “Why are there two string types?” …
Slices
Slices clicked for me when I stopped thinking of them as a language feature and started thinking of them as a design pattern: “here’s a …
Borrowing and References
After the last lesson, you might be thinking “so every function I call takes my data and I never see it again?” That would be terrible. …
Ownership
I spent three hours fighting the borrow checker on my first real Rust project. I was furious. Then I realized every single error the compiler flagged …
Control Flow
I once reviewed a pull request that had seven levels of nested if-else. In Go. The author said “the language doesn’t give me better …
Functions, Expressions, and Statements
When I first read that “everything in Rust is an expression,” I thought it was marketing fluff. It’s not. It’s a genuine …
Variables, Mutability, and Primitive Types
Coming from JavaScript, I was stunned the first time Rust refused to compile because I tried to reassign a variable. “What do you mean …
Hello, World
The first program I ever wrote was in BASIC on a Commodore 64 emulator. Took me twenty minutes to figure out why PRINT didn’t work (I was typing …
Installing Rust
I’ve installed Rust on maybe fifty machines at this point — Linux servers, Macs, Windows boxes, even a Raspberry Pi. The process has gotten …
Why Rust Exists
I mass-deleted a production database once because a C program I’d written had a use-after-free bug that corrupted a pointer used for query …
Traits: Mastering Traits in Rust — Navigating Edge Cases and Best Practices (Part 3)
Hello again, Rust enthusiasts! We’ve journeyed through the foundational concepts and dived into the advanced territories of Rust’s trait system in …
Mastering Rust: The Complete Guide to Pattern Matching
Looking to take your Rust skills to the next level? Master the art of pattern matching, one of Rust’s most versatile features! This …
Traits: Understanding Rust Traits - The Foundation (Part 1)
Welcome, fellow Rustaceans and curious minds! Today, we embark on the first installment of our series designed to explore Rust’s powerful trait …
Traits: Advanced Trait Concepts and Dynamic Dispatch in Rust (Part 2)
Trait Objects and Dynamic Dispatch In Rust, polymorphism achieved through traits can take two forms: static and dynamic dispatch. Static dispatch is …
From Novice to Master: 10 Must-Try Low-Level Programming Projects in Rust
Hey there! If you’ve been following along, you know we’ve been deep-diving into Rust, exploring its nooks and crannies. This time around, I’m …
Mastering Rust Lifetimes: The Comprehensive Guide
Mastering Rust Lifetimes: The Comprehensive Guide Understanding lifetimes in Rust is crucial for any Rustacean aiming to write safe and efficient …
Rust Ultimate: The Ultimate Rust Cheatsheet You'll Ever Need
Whether you’re a seasoned developer juggling multiple programming languages or a newcomer to Rust, it’s not uncommon to hit a roadblock …
Rust in Finance: Building a Scalable High-Frequency Trading Platform from Scratch
As I ventured deeper into the Rust ecosystem, I set my sights on a project that would not only challenge my technical acumen but also push the …