I had run across a blog post by Matt Welsh about using Rust at a startup [1], and thought perhaps I could get Matt to expound on using Rust. I like the idea of Rust a lot, as its memory safety features do away with about two thirds of the bugs found in software written in C and C++. I filed the thought away, until Matt caused another stir by writing an editorial for CACM [2].
I had met Matt during a HotOS workshop in 2013, and I later tried to get him to write about a favorite experience finding some obscure bug. Matt politely declined. This time, Matt is the CEO of the startup Fixie (fixie.ai), and the CACM article suggested that he would be more interested in talking this time around.
Rik Farrow: You wrote a blog post [1] in October 2022 saying that Rust is not the best choice for a startup. I was sad to read that Rust, with equivalent performance to C/C++ but eliminating about 67% of the typical vulnerabilities caused by using C (according to work on CHERI by Microsoft [4]), is just too hard to use.
Matt Welsh: As I wrote in my blog post, at a startup it's very important to move fast and often that means using less-good, but familiar and popular, tools. Choosing esoteric tools or programming languages is a big risk in a startup setting as you'll have difficulty hiring people who already know those tools. Rust is still new and unfamiliar enough that finding developers on the job market with Rust experience is pretty rare. Now, in the case of a language like, say, Kotlin or Swift, this is not that big of a deal because those languages are very, very similar to existing languages that the learning curve isn't that steep, so people can get up to speed quickly.
Rust, though, is a different beast. Its core tenant is that it should be impossible to write type- or memory-unsafe code. To achieve that goal, Rust makes use of some fairly novel language constructs, such as lifetimes and affine types, which are often hard for programmers to get their heads around if they have not seen them before. The good news is that if you can get a Rust program to compile, it's probably correct (at least, there should not be lurking memory or type errors that you might encounter at runtime). But getting a Rust program to compile is quite a chore, given how strict the language is. That coupled with the immaturity of the Rust ecosystem means that developers pay a heavy tax when using Rust. The question is whether it's worth it.

