ALTERNATE UNIVERSE DEV

Code[ish]

34. An Introduction to Rust

You couldn't find a more perfect pair of guests to talk about Rust than Carol Nichols and Jake Goulding. Carol and Jake write books that teach Rust, maintain websites that allow users to run Rust samples, record videos about Rust, and also manage the Rust Belt Rust conference, where Rust developers congregate in the Rust Belt region of America. Carol has a background in Ruby, and always sought to eke out more performance and less memory consumption. Jake has a background in C, but recognizes that it places a heavy burden on a programmer to be mindful of memory leaks and segmentation faults.

Rust is a fantastic programming language from Mozilla. It has a much simpler and intuitive syntax than C, the compiler is optimized to ensure that you are writing memory-safe code, and as a result, it produces executables that run much more quickly (and require less resource consumption) than a dynamic language like Ruby. Carol and Jake delve into how the Rust compiler does this, primarily by aggresively freeing memory and forbidding developers from interactions with dereferenced objects. To newcomers, Rust seems like a forboding language, but Carol and Jake believe that Rust's emphasis on terrific documentation and error messages help guide newbies and veterans alike into writing safer and faster code.

Several large companies see the benefits of Rust and are writing it in production, such as Mozilla, Google, Facebook, and Amazon. Heroku even has an unofficial buildpack for serving Rust applications, and Carol notes that in one of her projects she's paying more for log storage than for dyno consumption, due to how efficiently Rust uses memory.

Rust has an ecosystem-first approach to language design (rather than placing everything into the standard library), which has fostered a largely collaborative open source community. Carol and Jake advise, however, that the language is still evolving, and they don't recommend rewriting all your functional business logic into Rust just yet.

The two conclude by providing many resources on getting started with Rust in the form of books, videos, and coding challenges.

Episode source