This is the collection of case studies demonstrating how migrating into Rust saves the planet by saving energy.
One can write a software that does a particular job in different languages: Python, Go, Javascript, Rust... you name it. The choice matters. The efficiency of the software at runtime affects the planet.
The less system resources a software utilizes on runtime the better:
- more computations can be handled by single unit of hardware,
- less units of hardware are needed to scale,
- less energy is used,
- smaller demand for hardware saves world's resources (metal, semiconductors)
https://www.figma.com/blog/rust-in-production-at-figma/
Each time we moved from a JavaScript-based tool to a Rust-based one, we saw enormous improvements. We migrated away from Babel, which resulted in 17x faster transpilation. We replaced Terser, which resulted in 6x faster minification to reduce load times and bandwidth usage.
https://vercel.com/blog/turbopack
Others were discovering the joys of abandoning garbage collection. At Discord, engineers had long been annoyed that the garbage collector in Go—the language they’d used to build critical chunks of their software—would slow things down. Their Go software would carry out the procedure roughly every two minutes, even though the Discord engineers had written things so carefully there was no garbage to be collected. In 2020, they rewrote that system in Rust, and discovered it now ran 10 times faster.
At Discord, we’ve seen success with Rust on the client side and server side. For example, we use it on the client side for our video encoding pipeline for Go Live and on the server side for Elixir NIFs. Most recently, we drastically improved the performance of a service by switching its implementation from Go to Rust.
https://discord.com/blog/why-discord-is-switching-from-go-to-rust
We built our own search engine from scratch, in Rust, specifically for the domain of code search. We call this search engine Blackbird. To be fair, we’ve tried and have been trying, for almost the entire history of GitHub, to use existing solutions for this problem.
https://github.blog/2023-02-06-the-technology-behind-githubs-new-code-search/
https://www.efinancialcareers.com/news/2023/06/which-programming-language-uses-the-most-energy
https://ohadravid.github.io/posts/2023-03-rusty-python/
https://worldwithouteng.com/articles/i-saved-87-percent-on-compute-costs-by-switching-languages/