







Like many programmers, I find Alexis King's Parse, don't validate article fascinating, because it gives a name to an idiom that seems familiar and important - one I've observed and used in the past without naming it explicitly. This post is a review of the "Parse, don't validate" pattern applied to the Rust programming language (the original post uses Haskell). I was particularly interested in finding educational examples of this pattern in the Rust standard library and other well-known projects.
The Rust Programming Language - The Rust Programming Language
by Steve Klabnik, Carol Nichols, and Chris Krycho, with contributions from the Rust Community
Why Use Structured Errors in Rust Applications?
Going against the common wisdom of “using anyhow for applications”.
How Our Rust-to-Zig Rewrite is Going
For the past year and a half, the team building Roc's compiler has been rewriting our 300,000 lines of Rust code into Zig, for reasons I'll recap below. We recently passed an exciting milestone: feature parity with the original compiler!
Rust's Golden Rule
I find myself thinking about a particular design principle of Rust today. I’m not sure I’ve ever seen it named specifically before, but it gets referred to from…

Rust Programming Language
A language empowering everyone to build reliable and efficient software.

Parse, don’t validate
Historically, I’ve struggled to find a concise, simple way to explain what it means to practice type-driven design. Too often, when someone asks me “How did you come up with this approach?” I find I can’t give them a satisfying answer. I know it didn’t just come to me in a vision—I have an iterative design process that doesn’t require plucking the “right” approach out of thin air—yet I haven’t been very successful in communicating that process to others.
Place Capability Graphs: A General-Purpose Model of Rust’s Ownership and Borrowing Guarantees
Rust’s novel type system has proved an attractive target for verification and program analysis tools, due to the rich guarantees it provides for controlling aliasing and mutability. However, fully understanding, extracting and exploiting these guarantees is subtle and challenging: existing models for Rust’s type checking either support a smaller idealised language disconnected from real-world Rust code, or come with severe limitations in terms of precise modelling of Rust borrows, composite types storing them, function signatures and loops.
Learning Rust
Learning Rust - Rust Programming Language Tutorials for Everyone!

Introduction - Rust By Example
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
Rust Error Handling: thiserror, anyhow, and When to Use Each
In this blog post, we’ll explore strategies for streamlining error handling in Rust using two popular libraries: thiserror and anyhow. We’ll discuss their features, use cases, and provide insights on when to choose each library. TL;DR thiserror simplifies the implementation of custom error type, removing boilerplates anyhow consolidates errors that implement std::error::Error While thiserror provides detailed error information for specific reactions, anyhow hides internal details Return Different Error Types from Function Let’s start by creating a function decode() for illustration. The function has 3 steps:
Warnings for pattern matching
We examine the ML pattern-matching anomalies of useless clauses and non-exhaustive matches. We state the definition of these anomalies, building upon pattern matching semantics, and propose a simple algorithm to detect them. We have integrated the algorithm in the Objective Caml compiler, but we show that the same algorithm is also usable in a non-strict language such as Haskell. Or-patterns are considered for both strict and non-strict languages.

Rust and the Three Laws of Informatics
Rust and the Three Laws of Informatics After 10 years in the Java world, I have recently been looking at Rust more seriously. I am barely beginning Rust programming, yet I feel enthusiastic: I …

Hello World - Rust By Example
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
Help Wanted: Research Questions in Rust - Aaron Turon - OPLSS 2018