Welcome, Guest | Browse

Software Factory Archive

← Previous Work All Works Next Work →

Sixteen Thousand Lines of Rust

Rating:
General Audiences
Fandom:
StrongDM Software Factory
Characters:
Justin McCarthy Jay Taylor Navan Chauhan
Tags:
CXDB Rust Language Choice Learning Curve Borrow Checker
Words:
512
Published:
2025-10-04

Justin sent the message at 11 PM on a Thursday. Three words and a link: The server's Rust.

Jay read it at 11:03 PM. He was a Go programmer. He had been a Go programmer for years. Go was simple, readable, and boring in exactly the ways a production language should be boring. He had built html2text in Go. He had built tools and services and scrapers in Go. Go was home.

Rust was not home. Rust was a foreign country where they drove on the other side of the road and the street signs were in a script he couldn't quite parse.

"Lifetimes," Jay muttered to himself at midnight, reading the Rust Book's chapter on borrowing. "Okay. Lifetimes."

Navan, who had cut his teeth on Swift, found the transition slightly less disorienting. Swift had value types. Swift had optionals. Swift had a concept of ownership, even if it didn't enforce it with the same ecclesiastical severity as Rust's borrow checker.

"The borrow checker isn't your enemy," Navan told Jay the next morning. "It's more like a very strict teacher who won't let you move on until you actually understand the material."

"I've had teachers like that," Jay said. "I didn't like them either."

But he kept going. They both did. The first week was painful. Jay's code compiled on the third attempt at best, and the error messages were paragraphs long. The compiler didn't just tell you what was wrong; it told you why it was wrong, what you probably meant to do, and sometimes included a link to the relevant documentation. It was the most helpful rejection Jay had ever experienced.

By the second week, something shifted. Jay stopped fighting the borrow checker and started listening to it. When the compiler said a reference couldn't outlive its owner, Jay would pause, think about why, and realize that in Go he would have created a subtle data race in exactly that spot. The borrow checker wasn't preventing him from writing code. It was preventing him from writing bugs.

Navan hit his stride around day ten. His Swift background gave him intuitions about value semantics that translated directly. He wrote the first working version of the blob storage module—content-addressed, BLAKE3-hashed, append-only—in three days. It compiled with zero warnings.

"Zero warnings," he told Jay, trying not to sound smug and failing completely.

"I still have fourteen warnings in the turn module," Jay admitted. "But they're all about unused variables, and I'm keeping them because I'll need those variables next week."

Justin checked in periodically. He didn't write code—nobody wrote code by hand—but he reviewed the architecture, the module boundaries, the trait interfaces. "Rust forces you to make your assumptions explicit," he said during one of these reviews. "Every lifetime annotation is a statement about how long something matters. That's not overhead. That's documentation."

By the end of the month, the CXDB server was sixteen thousand lines of Rust. Jay could read it fluently. He still thought in Go sometimes, but the Rust was starting to feel less foreign. The street signs were becoming legible.

He never admitted to enjoying the borrow checker. But he stopped complaining about it, which for Jay was the same thing.

Kudos: 104

rustacean_lurker 2025-10-06

"The most helpful rejection Jay had ever experienced" is the most accurate description of rustc I've ever read. The compiler really does care.

borrow_this 2025-10-07

Navan's zero warnings flex is so real. We've all been there. Also the insight about lifetime annotations being documentation hits hard.

← Previous Work All Works Next Work →