NearlyFreeSpeech.net says goodbye to its C++ frontend — rewrites nfsncore in Rust

What the frontend actually is
NearlyFreeSpeech.net rewrote the core of its production “frontend” infrastructure — the servers that sit in front of member sites and do caching, proxying, routing, access control and TLS — moving a business‑critical service from C++ to Rust. The piece at the center of this change is nfsncore, a custom server process that previously handled almost every decision about incoming requests: IP access rules, proxy routing to custom daemons, alias and wildcard handling, HSTS, maintenance/offline modes, even ACME challenges for TLS. That matters. A bug here can take everybody down. It has been reported that until very recently the C++ implementation was the one doing all of this; as of yesterday, it allegedly is no longer running on any servers.
Why Rust?
Why rewrite? Why risk touching the thing you absolutely cannot break? The team gives practical answers. Rust delivers memory and thread safety out of the box, it’s fast, and its ecosystem — Cargo and crates.io — makes it easier not to reinvent wheels. Contrast that with the C++ state of affairs: no central package manager, older code that’s getting brittle and hard to extend, and libraries like Boost that can feel abstract and fiddly. There’s also the readability argument. The blog author holds up a tiny example — converting a hostname to lowercase — and asks: which of these two snippets do you want to read at 2 a.m. in a pager incident? It’s a small moment, and it lands: clarity matters when stakes are high.
The rewrite and what it means
This wasn’t dogma. It wasn’t a blanket “convert everything to Rust” decree. It was a sober decision about one piece of infrastructure that touches every request and thus every customer. Rust’s guarantees and modern tooling tipped the scales, and the team proceeded to reimplement nfsncore with that in mind. The emotional beat is obvious: choosing to rewrite something that could take the whole service down is nerve‑wracking. But the argument is pragmatic — safer code, easier future features, and a stronger ecosystem for maintenance.
So what’s the takeaway? This is a targeted, justified migration rather than a bandwagon sprint. In an industry that loves hot takes (“rewrite everything in X!”), NearlyFreeSpeech.net’s move reads more like careful engineering: not because Rust is a religion, but because for this particular, you‑can’t‑mess‑this‑up component, the tradeoffs favored a fresh start.
Sources: blog.nearlyfreespeech.net, Lobsters
Comments