Rust never sleeps: How a programming language enables green tech initiatives

Gettyimages.com/ Flavio Coelho

Find opportunities — and win them.

The Rust programming language has the potential to lower the environmental impact and energy usage of data centers while also driving developers to write more secure applications, our commentator writes.

Environmental impact may not be anyone’s first reaction to the increased adoption of a programming language. Yet, the focus on environmental, social and governance (ESG) initiatives in business and government have prompted many in IT to consider how the Rust programming language can not only help in faster, more secure coding, but in greener products as well.

Rust is incrementally finding its way into the open-source Linux kernel. According to an April installment of the Google Security Blog, Android now supports the Rust programming language for developing the OS. Google also is evaluating Rust as a supported programming language for the Linux kernel.

For some developers and service providers, the environmental benefits of this growing acceptance are on a par with its more obvious programming benefits.

This tracks with the interest shown in ESG at both the federal and state government level (as well as in the private sector). At the state and local level, the concept is being implemented by adopting ESG goals within government operations and services, in new policies and regulations, and in decisions about government assets and liabilities.

The federal government also has taken an active interest ESG initiatives, as indicated by a White House Executive Order issued May 20, 2021, regarding climate-related financial risk.

“In this effort,” the order reads, “the Federal Government should lead by example by appropriately prioritizing federal investments and conducting prudent fiscal management.” Major federal agency procurements should “minimize the risk of climate change, including ... preference to bids and proposals from suppliers with a lower social cost of greenhouse gas emissions.”

So how does that tie in with a programming language? It starts with data centers.

In February Amazon published a blog titled, “Sustainability with Rust.” They noted that data centers are responsible for 200 terawatt hours of energy use per year worldwide – about 1% of all energy usage. And yet, they also showed that demand has remained essentially flat as far back as 2010, despite growth in cloud-based storage and compute capabilities over the same period.

Broad adoption of Rust could reduce energy consumption of compute demands by a conservatively estimated 50%, Amazon wrote. Rust delivers the energy efficiency of the C programming language, “without the risk of undefined behavior,” according to the blog. “We can cut energy use in half without losing the benefits of memory safety.”

That’s significant not only for a cloud services company like Amazon’s AWS, but for the many software businesses that use the cloud to deliver and maintain their products. It’s so important for AWS, in fact, that it equates the shared responsibility of energy efficiency with its similar shared responsibility approach to security.

“AWS customers are responsible for energy efficient choices in storage policies, software design, and compute utilization, while AWS owns efficiencies in hardware, utilization features, and cooling systems,” the Amazon blog explained.

From a contractor’s perspective, this is significant for a variety of reasons. Let’s be frank: Most defense technology contracting firms don’t really have an ESG story. By incorporating Rust into their products and services, these firms can get ahead of the White House mandate to give procurement preference to businesses that can demonstrate socially and environmentally conscious efforts.

For developers, the vector to ESG starts with speed. The cloud fiscal model is based on metered billing – companies pay for all their compute instances by the hour, which is what makes it preferable to building out a corporate server farm. With a metered billing system, if a company running software to process data 365 day a year could save five seconds or more by using a programming language like Rust, the savings quickly add up.

For smaller companies this transition is likely to make an almost immediate impact on their bottom line. For a company like ours, it may take 10 seconds to process a complex file in Python, or four seconds in Java. It may take a single second using Rust. So a company may be able to process 10 more files using Rust than with Python.

For larger companies, the advantage is even more eye-opening, especially from an environmental perspective. Not only do these companies realize the same type of advantage as explained above, that advantage also means less energy usage, and a smaller carbon footprint overall. For a company the size and scale of Amazon, with all of its data centers, less energy required to serve its clients means a significantly reduced level of carbon emissions.

Those benefits don’t even take into account the third way in which Rust will help the contracting industry, which is memory security, as Amazon alluded to earlier. Rust was designed not to allow programmers to create unsafe software. It is ranked every year as the most favored developer language.

But it's also ranked as one of the more difficult ones, because it forces developers to write secure software. It will not allow developers to create software with security, bugs, and exploits. No other programming language so far has ever tried to enforce that, even at that lowest level. So while it may take longer to develop software with Rust, it's inherently more secure.

All of this is to say that there is an important story to tell with Rust – not just from the perspective of better, faster, more secure and more affordable products, but from the point of view of more environmentally sound business practices as well. The effort put into using Rust to develop products will be more than offset by the business advantages it will deliver.


Dave Hirko is founder and principal of Zectonal. He can be reached at dave@zectonal.com