Rust, started by Mozilla, is an up-and-coming programming language used by a host of major tech companies and startups alike that's one of the fastest growing languages, according to Microsoft's GitHub.The developer site Stack Overflow found that it snagged the top spot as the "most loved" programming language for five years in a row. It also found that Rust developers make a median salary of $130,000. Here's how developers at Amazon Web Services, Facebook, Discord, Dropbox, Fastly, Cloudflare, and Sentry use Rust â and why they love it so much.
Visit Business Insider's homepage for more stories.
In the past four months, Discord's app has become faster and its engineers have been able to write code more efficiently, too.
How? It's all thanks to a programming language called Rust.Â
After first using the language to build a game downloader tool in early 2018, Discord decided earlier this year to completely ditch the Google-created programming language Go to embrace Rust, instead.
"When people want to play a game, they want to play it as quickly as possible," Jesse Howarth, staff software engineer at the gaming chat company, told Business Insider. "When you're developing something, you want to develop as quickly as possible."
That's where Rust comes in. Rust is known for being easy to write, secure, and memory efficient, and developers see it as an alternative to Go or legacy programming languages like C++ and C.
"You can get the performance, but it is easier to write code without having bugs," Howarth said, comparing Rust to C++. "You don't have the mental burden of thinking about memory management and pointers that turn people off of C++."
Discord is only one of many companies that have picked up Rust in the past few years, which Mozilla originally developed for its Firefox browser. It's widely used by companies like Amazon Web Services, Dropbox, Fastly, Microsoft, Facebook, and more. Facebook is even using it to build its new cryptocurrency project, Libra, and Rust's adoption grew 235% in the past year, according to data from Microsoft's GitHub, making it one of the fastest growing programming languages.Â
"It's by developers, for developers," Fastly CTO Tyler McMullen told Business Insider. "Rust is clearly one of the most loved programming languages out there. We're pretty jazzed to be supporting it."
As McMullen says, developers are not only using Rust more, they adore it too: Rust topped Stack Overflow's list of favorite programming languages, according to its recent survey of 65,000 developers â for the fifth year in a row.
And knowing how to code in Rust pays well, too: According to the same survey, Rust developers in the US make a median salary of $130,000.Â
Discord cofounder & CEO Jason Citron. Kimberly White/Getty Images for TechCrunch. How Rust began
Mozilla first launched Rust in 2010 when it was building a new browser core for Firefox. Most browsers, including Google Chrome, Safari, and Microsoft Edge are written in C++, but Mozilla was dissatisfied with it, and wanted to build a completely new programming language that was more efficient. But Mozilla didn't want to just keep a budding language to itself or create it for a single purpose: It also wanted to build a community.
"We didn't want Rust to only be a language for building browser engines," Nicholas Matsakis, principal research engineer at Mozilla, told Business Insider. "We knew if we wanted to build a new language, it had to be widely usable."
Initially, Matsakis says the team thought of Rust as a more efficient replacement for C++. Most browsers, including Google Chrome, Safari, and Microsoft Edge are written in C++. However they also put careful consideration and focus into figuring out how to solve another major pain point for developers: that they spend a disproportionate amount of time weeding out bugs.Â
"That was the problem we were trying to solve," Matsakis said. "Could we get a level of control while protecting ourselves from those kinds of bugs so developers can focus on building the thing they're building?"
Besides Firefox, Mozilla also uses Rust for projects like Stylo, used for designing web pages, and its monitoring server.
Mozilla made Rust an open source language, meaning it was free for anyone to use, download, or modify. As more developers began experimenting with it and learning to use it, the positive reviews started spreading and companies like Facebook, Dropbox, and AWS started adopting it.Â
Evan Lorne/Shutterstock Why companies like using Rust: 'Things kind of just work'
Discord decided to start using Rust because the company had issues with memory and speed when using Go.
Go, like many other programming languages, uses a memory management process called "garbage collection" that systematically runs through a program to free up memory that's not currently being used. Rust does not use garbage collection. Instead, it allows developers to encode "ownership" to keep track of memory. When memory is no longer being used, it's immediately freed up, which is faster and more efficient than waiting for a garbage collector to check that it's free.Â
After Discord switched over to Rust, Howarth says that its app worked faster, and its engineers are able to develop more quickly as well.
The memory efficiency drew Dropbox to Rust as well. Since 2016, Dropbox has used it for building file uploading features, storage, code libraries, back end servers, and more. Dropbox software engineer Sujay Jayakar says that Rust has been a "huge success" for Dropbox and "a delight to program," because it gives programmers more control. Rust combines the best pieces of many long standing programming languages like C++, but adds innovations of its own, he says.Â
Dropbox co-founder and CEO Drew Houston Jin S. Lee/Business Insider "The benefits of Rust have been a huge, huge win for us," Jayakar said. "We've been able to move quickly. We don't need to spend as much time hunting down bugs."
Why the decrease in bugs?Â
Beyond its memory management model, developers like that Rust's type system â how programming languages assign properties to different software components â prevents variables from being null (or having no value attached to them). This avoids the dreaded null pointer exception which occurs when a program references something that doesn't have a value â and has been referred to the "billion dollar mistake." Null pointers often crash programs, and Rust prevents them.
"You've heard of the 'billion dollar mistake' before," Facebook software engineer Mark Thomas told Business Insider. "Rust doesn't have that."
Facebook first started using Rust two and a half years ago with projects called Mononoke and Mercurial, which help engineers at the company track and monitor code changes. Facebook software engineer Thomas Orozco estimates that it made Facebook's programs about 10 times faster.Â
"Things kind of just work when you do them in Rust," Orozco told Business Insider. "You can do the simplest thing you can do, and you get good performance out of it."
Most recently, Facebook picked Rust to implement core features for its new cryptocurrency Libra because of its security features â something that's especially crucial for that project.Â
David Marcus, CEO of Facebook's Calibra digital wallet service, smiles as he appears during a House Financial Services Committee hearing on Facebook's proposed cryptocurrency on Capitol Hill in Washington, Wednesday, July 17, 2019. AP Photo/Andrew Harnik Rust has a steep learning curve, but it pays offÂ
One challenge of Rust is that it has a steep learning curve, developers say. However, once engineers understand it, it pays off quickly.Â
"Over the past year, we've found that even though Rust has a high learning curve, it's an investment that has paid off," Ben Maurer, tech lead for the Libra-focused Facebook subsidiary Calibra, told Business Insider. "Rust has helped Libra build a clean, principled blockchain implementation."
Dropbox's Jayakar echoed that once a few people became proficient, they could make quick progress.Â
"It paid off very very quickly," he said. "We were able to get our server in production and in our performance budget with a very small team at a very accelerated schedule."Â
Another challenge, according to Cloudflare CTO John Graham-Cumming, is that since it's a newer language, some libraries â which include code needed to support and run an application â are not as developed. Engineers need to stay on top of new updates as the language matures. Still, he adds, these challenges are minor.Â
"I think it's going to be one of the major languages that people use to write fast, safe code," Graham-Cumming told Business Insider. "I think it will coexist with other languages like Go for a very long time."
Cloudflare co-founder and CEO Matthew Prince Anthony Harvey/Getty Images Why Rust has grown so fast
Rust has been able to grow in large part because of its open source developer community.
That's what originally drew AWS to it.Â
AWS started toying with Rust in 2012, and it got more serious about it in 2015 and 2016 because more of its customers were talking about it as their preferred language, says Peder Ulander, general manager of open source at Amazon Web Services.Â
"It's a way for us to go after that developer community early on," he said. "While it started within our infrastructure, it started to make its way into other teams."
Today, AWS uses Rust for its storage and compute platform, as well as its serverless product Lambda, which allows developers to run and scale their code without having to manage the servers. Rust is also core to AWS's open source virtualization-technology project Firecracker.Â
"It's a very friendly and safe programming language," Ulander adds.Â
Since Rust is open source, developers have also built a plethora of tools to help support Rust. It's still maintained by Mozilla, and other companies have said that the Mozilla team is especially supportive. Â
Discord, for example, has a symbiotic relationship with Mozilla's Rust team. The Rust team itself uses Discord, so Discord's team can hop on their shared chat if they have any questions about Rust.Â
"One thing worth noting is the Rust community is really doing a great job," Howarth said. "There's a lot of community libraries out there that people are working hard to work really well and a lot of thought that goes into it."
Amazon Web Services CEO Andy Jassy Amazon Fastly's McMullen agrees that the developer community around Rust is very welcoming.Â
"It doesn't matter if you don't know C: The Rust community is welcoming to people of all these different backgrounds," McMullen said. "The community around the languages are indicative of the people who started the language."
Mozilla's Matsakis works with the Rust open source community, and he says one of the first things the team did was create a process for submitting changes and improvements to the language. Today, he sees developers using it for servers, embedded systems, cryptocurrency, and more.
"The community drives and helps us steer and ensure the language and meeting people's needs," Matsakis said.Â
Finally, developers say Rust has grown so fast simply because developers love it.
"Rust is growing very fast to a large degree because people really enjoy writing it. It shifts the mental model in how you program," Armin Ronacher, director of engineering at Sentry, told Business Insider. "People that start working with the language, they develop a new sense of how to write code and it's very appealing."
Fastly chief architect and executive chairperson Artur Bergman Fastly The future of Rust
Today, developers use Rust in web applications, servers, game engines, operating systems, virtual reality, and other systems-intensive tasks. And now, Rust is increasingly being used for embedded devices â where before, the older programming language C has reigned supreme â as well as with WebAssembly, which is used for running modern web browsers.
Other languages have come and go, Facebook's Thomas says Rust is here to stay, thanks to its reliability, robustness, and ability to stop prevalent bugs.Â
"You don't need to be on your toes when you're coding in Rust," Thomas said. "Rust is the first language in a long time that brings something new to the table. Other languages promise a lot but don't bring real improvement to the developer ecosystem."
AWS's Ulander predicts that companies will increasingly pick Rust as a default language for infrastructure projects. He says the last few years have been the "awkward teenage years" where more people are paying attention to it and starting to learn it. Now, Rust is in the middle of a "growth spurt."
"It's easy to use, extremely well put-together, the community is engaging and very easy to participate in, and you have all the needs of documentation that makes for a very good developer experience," Ulander said. "That's usually the biggest challenge. Rust gives them that sense of security and fun."
Got a tip? Contact this reporter via email at This email address is being protected from spambots. You need JavaScript enabled to view it., Signal at 646.376.6106, Telegram at @rosaliechan, or Twitter DM at @rosaliechan17. (PR pitches by email only, please.) Other types of secure messaging available upon request.Â