I’ve written a couple of articles about how Rust is becoming more central to Web3, DeFi and blockchain communities.
Today I wanted to speak more broadly in industry why some people are choosing to learn Rust.
Rust began as a side project of Graydon Hoare, an employee at Mozilla. In short order, Mozilla saw the potential of the new language and began sponsoring it, before revealing it to the world in 2010.
Rust Appears to be a Rising Programming Language
Despite its relative youth, Rust has steadily risen in the ranks of popular programming languages. In fact, while it ranked 33 in July 2019, by July 2020 it had risen to the 18th spot on the TIOBE Programming Community Index. Similarly, according to Stack Overflow Developer Survey, Rust has been the “most loved” language since 2016.
Principled behavior for Rust
In building Rust, the Rust community has evolved the “Rustacean Principles” to balance sometimes competing development priorities. They are:
“Reliable: If it compiles, it works.”
“Performant: Idiomatic code runs efficiently.”
“Supportive: The language, tools, and community are here to help.”
“Productive: A little effort does a lot of work.”
“Transparent: You can predict and control low-level details.”
“Versatile: You can do anything with Rust.”
Why at AWS, Rust Adoption is High
Cloud-computing giant Amazon Web Services (AWS) has outlined the reasons its engineers are embracing Rust, including that it's a more energy-efficient programming language.
Let’s not forget, Microsoft rewrote a low-level Windows component in Rust. It called the experience "generally positive."
In a series of blog posts back in 2019, the company announced that it would explore the idea of rewriting various products in Rust, a programming language that was built from the ground up with security in mind.
Rust’s reliability is “most often at odds with making Rust feel productive and supportive.” Why? Because Rust relies on cross-checking across the system to ensure overall consistency.
Just seven years ago, the Rust programming language reached version 1.0, making it one of the youngest languages and one that also holds big promise for large code bases written in C and C++. Today, Amazon, Google, and Microsoft back the language. To see it thriving in some crypto circles is not surprising.
Rust’s community even contributes whimsically to some kind of a code of conduct for Rust programmers. the Rust community also include a section on “how to [be] Rustacean”:
”Be kind and considerate”
”Bring joy to the user”
”Show up”
”Recognize others’ knowledge”
”Start somewhere”
”Follow through”
”Pay it forward”
”Trust and delegate”
I think this demonstrates how important “soft-skills” are in the reality of being a successful programmer in the real world. It’s a team sport.
A little over a year ago, Microsoft on February 8th, 2021 decided to join the Rust Foundation.
Open source software and languages are of critical importance both to Microsoft and to the entire tech industry. This is especially true for systems programming languages like Rust. As Rust usage in Microsoft grows, they decided to join it more officially.
In terms of syntax, Rust is similar to C and C++, incorporating many of the keywords and commands from both languages. It is not a direct clone, however, and has some elements not found in either C or C++. This means in many ways Rust is the new kid on the block.
If you think this topic is awesome feel free to share it with someone who might as well.
AWS Understood Rust’s Future Earlier than Microsoft
AWS understood this earlier than Microsoft. Rust isn't as popular as Java, JavaScript or Python, but it's become a critical language for building systems like the Linux kernel, Windows, Chrome, and Android. AWS was an early supporter of Rust and is a founding member of the Rust Foundation, and has an ongoing Rust recruitment drive.
Rust has succeeded, in significant part, because its community has not been willing to sacrifice the central tenets of what Rust means. That a software language can have a culture and principles among the developers who use it really is quite impressive. Just like a Doctor has a hippocratic oath or a scientist follows an objective truth or a business executive learns to be data-dependent, programming too as a well-developed ethos of the trade.
Rust does not have automatic garbage collection, nor does it use Automatic Reference Counting like Swift. Instead, it is designed to be memory safe by using principles of ownership and borrowing, as well as discouraging undefined behavior. Because it does not use garbage collection, this makes Rust an ideal option for integration with C. You can even keep up with what’s going on with the evolution of Rust.
One of the main reasons to learn Rust is simply because Rust is part of the future, just as Python is. Rust is a great language and has a bright future ahead of it. Rust will NOT replace C++, just because nobody will ever translate all the existing C++ code into Rust.
Even in Crypto, it’s clear Rust has quite a fan base:
Cryptocurrencies written in Rust
nearprotocol/nearcore — decentralized smart-contract platform for low-end mobile devices.
ethaddrgen — Custom Ethereum vanity address generator made in Rust
coinbase-pro-rs — Coinbase pro client in Rust, supports sync/async/websocket
Grin — Evolution of the MimbleWimble protocol
polkadot — Heterogeneous multi‑chain technology with pooled security
parity-ethereum — Fast, light, and robust Ethereum client
parity-bitcoin — The Parity Bitcoin client
parity-bridge — Bridge between any two ethereum-based networks
ArgusObserver/wagu [wagu] — Generate a wallet for any cryptocurrency
rust-cardano — Rust implementation of Cardano primitives, helpers, and related applications
cardano-cli — Cardano Command Line Interface (CLI)
Nervos CKB - Nervos CKB is a public permissionless blockchain, the common knowledge layer of Nervos network.
ChainX - Fully Decentralized Interchain Crypto Asset Management on Polkadot.
Rust helps developers avoid a host of memory-related flaws common to C/C++, which ultimately cost organizations in security updates. Thus in a cybersecurity friendly world, Rust will flourish.
Think about it, Mozilla-created programming language Rust could one day help Microsoft kill a large chunk of its worst security bugs. Microsoft is demonstrating it really cares about security. It’s reputation depends upon it.
Rust is also somewhat user-friend. While Rust is relatively new, it has obviously gained a strong following. In relation to the languages it is compared against, especially C and C++, Rust is easier to learn and safer to use for new programmers.
Rust is a programming language implemented as a set of open source projects. It combines the performance and resource efficiency of systems programming languages like C with the memory safety of languages like Java. Even the Earth will one day become like Mars, all things return to Rust.
Microsoft has explained why it's pursuing 'safe systems programming' through efforts like its experimental Rust-inspired Project Verona language and its exploration of the Rust programming language for Windows code written in C++.
Is Rust More Environmental Friendly?
AWS's Rust advocate and software engineer Shane Miller and Carl Lerche, a principal engineer at AWS, highlights that Rust isn't only about memory safety and reducing security flaws; it's a far greener language than Python and Java. In that way, it backs up Amazon's broader push to make its data centers less harmful to the environment, with the company aiming to have its datacenters go totally renewable by 2025.
I did not realize Rust was a “Greener” programming language, that’s new to me. How about you?
AWS’s adoption of Rust systems since 2019 is pretty whacky.
At AWS, Rust has quickly become critical to building infrastructure at scale. Firecracker is an open source virtualization technology that powers AWS Lambda and other serverless offerings.
It launched publicly in 2018 as their first notable product implemented in Rust. We use Rust to deliver services such as Amazon Simple Storage Service (Amazon S3), Amazon Elastic Compute Cloud (Amazon EC2), Amazon CloudFront, and more.
In 2020, they launched Bottlerocket, a Linux-based container operating system written in Rust, and our Amazon EC2 team uses Rust as the language of choice for new AWS Nitro System components, including sensitive applications, such as Nitro Enclaves.
Rust as a Developer Culture of Empowerment
So learning Rust might be a good idea if industry leaders like AWS and Microsoft are this bullish on the new programming language.
Microsoft was highlighting the great dev experience as being another reason they enjoyed working in Rust.
For C++ developers used to writing complex systems, using Rust as a developer is a breath of fresh air. The memory and data safety guarantees made by the compiler give the developer much greater confidence that compiling code will be correct beyond memory safety vulnerabilities. Less time is spent debugging trivial issues or frustrating race conditions. The compiler warning and error messages are extremely well written, allowing novice Rust programmers to quickly identify and resolve issues in their code. VSCode already has a helpful extension (RLS), which provides Intellisense suggestions and syntax highlighting. Additionally, the Cargo build tool offers very helpful features around testing, documentation generation, and auto formatting. - Microsoft Software developers
So it’s no wonder that Rust is a well-loved programming language.
I hope you enjoyed my coverage of Rust in this article. I think Rust adoption will continue to gain momentum in 2022. I’m impressed by the positivity around the language and its developer experience.
“What makes Rust stand out from all other languages is its marriage of low-level control with uncompromising safety. And what we’ve discovered from using Rust at scale is that this combination has incredible enabling effects, empowering new programmers to dive down into the lowest levels of programming, and emboldening seasoned systems programmers to aim higher.”
If you enjoy my articles please considering tipping, patronage and support as I cannot continue to write without community support. I want to keep my articles free for the majority of my readers.
I’m hoping this Newsletter can help, inform and inspire someone out there.
Thanks for reading!
Good article. I have been a Go programmer for the last decade, writing large network security and AI systems. Prolog is my other key language, and I have used many languages in my career. I am programming more and more in Haskell and working with proof system languages Lean and Coq.
I moved to Go from python. I liked the idea of python features in an efficient C-style language. In the last ten years I have appreciated the Go system expecially for concurrent programming. Go achieves many of the same safe programming goals as Rust. If a program compiles it usually works. But Go attaches a 1MB run time to every program. I am excited to learn Rust to free myself of this overhead. And I just love languages.