You’ve probably never written anything in Rust, the open source, systems-level programming language created by Mozilla, but you likely will at some point. Developers crowned Rust their “most loved” language in Stack Overflow’s 2019 developer survey, while Redmonk’s semi-annual language rankings saw Rust get within spitting distance of the top 20 (ranking #21).
This, despite Rust users “find[ing] difficulty and frustration with the language’s highly touted features for memory safety and correctness.”
Why is a language known to be somewhat difficult to learn so well-loved? In conversations with developers, it seems the answer comes down to the idea that Rust is “systems programming with guard rails,” as Oso CTO Sam Scott describes it, with one of those “guard rails” being an exceptionally welcoming community.
Systems programming with guard rails
Most developers don’t normally travel into systems programming territory. Application developers, for example, tend not to need to get close to the underlying hardware. They also likely don’t need to build platforms upon which other software will run, a core definitional element of systems programming.
For those developers who do work with lower-level programming languages like C or C++, Rust is a revelation, something I first covered in 2015. Fast forward a few years, however, and Rust just keeps getting better.
Asked to detail Rust’s major selling points, developer David Barsky offers the following:
- Performant. Rust is able to replace C/C++ in spaces it typically thrived in. For example: “For latency-sensitive network services, Rust’s lack of runtime garbage collection results in almost non-existent tail latencies.”
- Reliable. “Its type system and borrow checker—a static, compile-time garbage collector—prevents whole classes of bugs that are accepted as ‘normal’ in Python, Java, and C++.”
- Developer productivity. “Cargo, the build tool and package manager, is one of the best build systems and package managers I’ve used.” Rust also comes with excellent built-in documentation, and great, built-in unit, integration, and documentation testing.
Barsky’s experience seems similar to Scott’s. Coming from higher-level programming languages (Java, Ruby on Rails), Scott says his experience with C was less-than-pleasant: “C was awful because I was constantly running into memory issues, segfaults, etc. And I more or less felt like I was fighting with the code the whole time.”
Rust, by contrast, was “systems programming with guard rails.” Scott explains:
Then I tried Rust (it had just turned 1.0), and it felt like systems programming with guard rails. All the things I needed to do low-level systems programming, but with a lot of help to debug and to make the code safe – like the borrow checker and compiler, and then later on tooling like the linters (“clippy”). It had offered a lot of the familiar aspects of functional and object-oriented programming, and just seemed to fit with my mental model of how I wanted to build systems.
As co-founder of Oso, Scott couldn’t avoid lower-level programming. Oso, with a mission to make back-end infrastructure security invisible for developers and simple for ops,” needs the performance that a systems-level language offers. “We can’t use a garbage-collected language like Go, because the performance wouldn’t be consistent enough for what we do, since we sit on the critical path of customer traffic,” Scott said.
All of which sounds great, until we return to the potential problem of sourcing developer talent well-versed in a relatively new language. However, accessible talent may be Rust’s best feature of all.
Rust programmers wanted
A critical component of learning something new is having people willing to help with the transition. Here Rust shines. As Barsky puts it,
The Rust community is full of passionate, kind, and intelligent people. It has a strongly-enforced code of conduct, which means that rude or harassing behavior is not tolerated. Anecdotally, it has some of the highest concentrations of LGBTQA people I’ve seen in any tech community.
This community is a big reason that, according to Scott, developers can pick up Rust in a few months. Rust “requires a bit of a change of mindset,” he says. “You need to do more work up front reasoning about things like types and lifetimes.” But once you get there “it pays dividends down the line.”
Small wonder, then, that so many developers love Rust. The upside is big and the downside is minimized by Rust’s welcoming and inclusive community.
This story, “Why the Rust language is on the rise” was originally published by
Share this post if you enjoyed! 🙂