Rust and the beauty of strict compilers
A reflection on choosing Rust for personal projects, the beauty of the compiler's strictness, and how it mirrors the Japanese concept of 修行 — disciplined practice through repetition.
The Compiler as Sensei
There is a moment, familiar to anyone who has spent time with Rust, when the compiler refuses your code for the third consecutive time. The borrow checker, unrelenting in its precision, points to the exact line where your assumptions about ownership fail. In most languages, this would be a frustration — a barrier between you and the thing you want to build. But in Rust, I have come to see it differently. The compiler is not an obstacle. It is a teacher.
I chose Rust for my personal projects not because it was the most productive language, nor because it was trending on Hacker News. I chose it because writing Rust felt like a practice — something closer to calligraphy than to typing. Every function signature is a small act of intention. Every lifetime annotation is a declaration of how long a thing should exist in the world. There is a meditative quality to this precision that I have not found elsewhere.
修行 (shugyō) — the path of disciplined practice. Not practice to achieve mastery, but practice as an end in itself. The repetition is the point.
Ownership as Philosophy
Rust’s ownership model is, at its core, a philosophy about responsibility. When you own a value, you are responsible for it — for its creation, its use, and its eventual release. There is no garbage collector to clean up after you, no runtime safety net. This is not a limitation. It is a form of respect for the machine and for the craft itself. In Japanese woodworking, the joiner does not rely on nails or glue. The joint must hold through precision alone.
Consider the simple act of passing a string to a function. In most languages, this is invisible — the string is copied or referenced without thought. In Rust, you must decide: will you lend it, or give it away? This small decision, repeated hundreds of times in a project, trains a particular kind of attention. You begin to see your data not as abstract symbols but as physical things with weight and duration.
A Small Example
Here is a pattern I return to often — a function that borrows a reference and returns something new. The signature alone tells a story about the relationship between input and output:
fn distill(input: &str) -> Option<Insight> {
let words = input.split_whitespace();
let meaning = words
.filter(|w| w.len() > 3)
.collect::<Vec<_>>();
Insight::from(meaning)
}
The function borrows — it does not consume. It returns an Option, acknowledging that not every input yields insight. This is Rust at its most honest: a language that encodes uncertainty into its type system rather than hiding it behind exceptions or null values.
The Practice Continues
I do not write Rust because it makes me faster. I write it because it makes me more careful, more deliberate, more present in the act of creation. Each evening I sit with a small project — a CLI tool, a parser, a tiny web server — and I practice. The compiler corrects me and I listen. There is no destination, only the continuous refinement of attention. This is shugyō. This is enough.