Rust

What is Rust?

Rust is a multi-paradigm programming language supporting these six paradigms: imperative, object-oriented, concurrent, functional, meta-programming, and generic programming. Rust is considered to be a low-level language but is higher-level than C due to its functional elements and pattern-matching. It is a systems programming language with a syntax that can be described as hovering between Python and C. Rust requires compiling similarly to C but is compiled using rustc or the Cargo build system – and Cargo also serves as its package manager. 

Three main features keep Rust memory- and thread-safe (which C lacks): ownership, borrowing, and lifetimes. Designed with memory safety and memory management in mind, Rust requires developers to choose to use safe code or turn off some of these restrictions if safe Rust isn’t able to materialize a specific concept using the unsafe keyword. Rust also uses the resource acquisition is initialization (RAII) convention instead of an automated garbage collection system to manage memory. 

You can find Rust working in many of today’s largest technology companies. Author of “Rust in Action,” Tim McNamara, shares a list of the following large technology leaders who have adopted Rust:

  • Amazon Web Services runs its serverless computing offerings, AWS Lambda and AWS Fargate with Rust.
  • Cloudflare develops many of its services with Rust, including its public DNS, serverless computing, and packet inspection offerings.
  • Dropbox rebuilt its storage backend in Rust during 2015-2016, which manages exabytes of storage.
  • Google develops portions of the Chrome OS and Fuchsia operating systems in Rust.
  • Facebook uses Rust to power Facebook’s web, mobile, and API services. HHVM, the virtual machine used by the Hack programming language, is partially written in Rust.
  • Microsoft writes components of its Azure platform in Rust, including a security daemon for its Internet of Things (IoT) service.
  • Mozilla uses Rust to enhance the Firefox web browser. The browser project contains 15 million lines of code. Mozilla’s first two Rust-in-Firefox projects, its MP4 metadata parser and text encoder/decoder, have led to performance and stability improvements.
  • npm, inc uses Rust to deliver “upwards of 1.3 billion package downloads per day” using Rust.
  • Oracle has developed a container runtime in Rust, to overcome problems that they perceived with the Go reference implementation.
  • Samsung, via its subsidiary SmartThings, uses Rust in its “Hub”. The Hub is the smart devices firmware backend for its Internet of Things (IoT) service.

He goes on to write that Rust’s productive powers fast-moving startups today like:

  • Sourcegraph uses Rust to serve syntax highlighting across all of its languages
  • Figma employs Rust in the performance-critical components of its multi-player server
  • Parity develops its client to the Ethereum blockchain in Rust

History

Rust began as a personal project started in 2006 by Graydon Hoare, a Mozilla employee at the time. Hoare remained on the Rust team as the technical lead until mid-2013, when he stepped down for personal and professional reasons, but he still considers Rust to be “a very important technical contribution to the landscape.” 

In 2011, Rust successfully compiled itself using rustc, and just one year later, the first pre-alpha release of Rust was publicly available. The Mozilla Foundation released Rust 1.0, the first stable release, in 2015. New Rust versions and fixes have been released every few months since. Rust was built using the LLVM compiler infrastructure project, so any performance improvements in LLVM increase Rust’s performance. And since Rust language decisions were made with speed & performance as a priority, Rust was developed to be as fast as C++ when measured with various benchmarking tests. 

There were concerns about the continuation of Rust due to Mozilla laying off several Rust employees in August 2020 during the ongoing COVID-19 pandemic. However, Amazon Web Services (AWS) hired some Rust language developers in November 2020 to increase Rust-based development within its cloud services. 

While Rust isn’t as ubiquitous as Python, Perl, or C++, its fame is rising due to its popularity with programmers and its adoption in several well-known browsers, operating systems, and other programs or projects. Web browsers and related components like Mozilla Firefox, Servo, and Quantum are all written in Rust, while operating systems Google Fuchsia, Blog OS, Stratis, and Redox have components written in Rust. Microsoft Azure: IoT Edge and Discord, the gamer chat service, have aspects written in Rust. Though Tor, the famed anonymity-based volunteer overlay network, was originally written in C, its developers are now switching over to Rust because of its security features. 

Competition

Andrew Binstock, the editor-in-chief of Dr. Dobb’s Journal (DDJ), said in 2014 that Rust is “widely viewed as a remarkably elegant language” and that it could become a competitor to C++, D, Go, and Nim. The main issue with Rust, according to Binstock, was that Rust’s object systems changed considerably before the first stable release of Rust in 2015. 

Now, Rust has earned recognition as the most-beloved language according to an annual StackOverflow survey – with TypeScript and Python placing second and third, respectively. (In comparison, Perl, VBA, and Objective C are developers’ least favorite languages.) 

There are downsides, though. It is common for programmers to get several errors when compiling code due to Rust’s emphasis on memory and thread-safety. It is vital to realize that error messages stopping the compilation are simply identifying the same potential vulnerabilities and bugs that would be found in another language without the safety checks. 

Explore

The official website for Rust, maintained by the Rust Team since 2014, is rust-lang.org. It contains install packages, a basic educational overview of Rust, the Rust standard library APIs, a comprehensive reference book, a playground, community forums, and a helpful, frequently-updated blog. Rust is an ideal language for developers needing a low-level language and a high degree of thorough security to prevent costly vulnerabilities later down the line. 

Rust has a small but growing community of “Rustaceans” that are excited about the relatively new language; this community can be found on the official website or on StackOverflow.

Turn your ideas into innovation.

Your ideas are meant to live beyond your mind. That's what we do - we turn your ideas into innovation that can change the world. Let's get started with a free discovery call.
Scroll to top