Adoption of Rust: Who’s Using It and How
This is the first of a two-part series.
Rust has been the most loved language in Stack Overflow’s annual survey for seven years in a row, and Rust Conference 2022 highlighted the many industries and developers setting sail on the Rust seas. While many developers at the conference have charted a clear course, there are still a number grappling with how they might use the language.
Intended as a more reliable, safer alternative to C++, software developer Graydon Hoare created Rust as a personal project while working at Mozilla Research in 2006.
Microsoft, just one of the major tech companies using it, has decided C++ no longer is acceptable for writing mission-critical software, calling Rust the best choice on the market for a performant, memory-safe language.
Let’s take a look at who is using the technology, why it’s well loved and what may hinder others from joining them.
Who Is Really Using It?
The Rust Foundation has around 38 members and donors and lists 138 production users. The lion’s share are software companies, many providing APIs and services. This is changing as many vertical industries, small companies, universities and research facilities join in. An estimate of 200, seems to be an underestimate when it’s understood that compute infrastructures, such as at Amazon Web Services (AWS), are being oxidized (that is rewritten in whole or part in Rust). Suddenly, many existing apps can benefit from Rust with no or limited additional costs.
Can we identify 200 companies though? Well technically, I only got to 174. “Black Hat Rust” author Sylvain Kerkour presents more than 42 companies using it in his research. We intersected those with the Rust Foundation’s list and added a few recently publicly announced. So there is reasonable evidence of a substantial grassroots inclusion of the language by developers in large and small companies for production and development.
Rust’s package repository Crates.io is growing at a respectable 87 crates per day, according to Modulecounts. Not the fastest, but not anemic either. Along with that, performance improvements in code execution and stability of the compiler are trending higher. Investments will likely pick up speed as mainstream familiarity and confidence with the language grows.
Infrastructure Developments (APIs and Cloud Services)
It can be easily illustrated that major tech vendors (many user-facing) have taken up the Rust mantle. Consider the reach of this alone. What could have influenced these major cloud providers? Possibly the speed and efficiency of the language. Perhaps, specific examples like Dropbox’s successful departure from AWS to its own platform using a rich amount of Rust. Do you use Dropbox? Surprise you are using Rust!
Based on security and reliability concerns, Azure CTO Mark Russinovich is urging developers to avoid using C or C++ in new projects, advocating they use Rust instead. He recently said the industry should treat C and C++ languages as “deprecated.” That ZDNet article also alludes to the use of Rust at Meta, Google (Android and Chrome), the Linux Kernel and even possibly inside Windows itself.
On the user and startup front, web-based collaborative design tool Figma, recently acquired by Adobe, outlined its experiences, good and bad, with Rust development in this 2018 article. Keep in mind continuous improvement by the Rust community has been ongoing since then. Still, many users and developers will be using Rust in cloud tools, perhaps both knowingly and unwittingly.
Increased Uptake with Researchers and Scientists
The code execution speed increases when compared to, say, Python, the current favorite for scientific research, leads many to herald the new Rust environment. This directs data science and artificial intelligence researchers to Rust. Performance in training large datasets is important and becoming crucial when systems are under development. Additionally, more than a dozen libraries for computation are in use or under development by the Rust Community. This count does not include available data processing support libraries.
Rust’s Language Advancements
Efficiency and Energy
“Green bias” is a factor in this progression. Rust can prove itself right alongside C and C++ by generally being as efficient as well as energy efficient as any low-level language. Research from Portugal reveals Rust’s efficiency. It should be noted that valid criticisms of this data exist. For example, the benchmark size for C++ is so small that this test mainly measures OpenMP initialization. Those criticisms do not affect generally the point here, which is that Rust is extremely energy efficient. Take a look at the most recent performance data. Improvement in the toolchain might even provide further enhancement. Please compare how Python, although a wonderful language, fares in this analysis.
GitHub provides perhaps the most telling aspects of this increase in Rust adoption. As of Nov. 10, there at least 24 trending repos written with Rust as the primary language. A simpleminded direct search shows there are 165,209 specifying Rust language. This is an increase of over 9,000 repositories since September of the same year.
|GitHub Simpleminded Search|
Awesome Rust (unofficial) on GitHub has about 1,300 entries covering ostensibly most major interest areas in modern computing to at least a modest degree. As GitHub’s API has changed enough in recent years to prevent the timely retrieval of results meaningful to this inquest, further details on industry-sector utilization will be published in a future article.
Criticisms and Gaps
Gaps in runtime or library environments are few in the sense that few areas remain untouched. There are a few recurring themes in maturity. Improvement in async and highly parallelized networking, production of cutting-edge machine learning/artificial intelligence systems, a need for some UI implementation clarity or direction and just in general, to reiterate, crate maturity in some areas.
Cargo, the package/build manager, has a variety of mixed reviews despite its power. Most of this seems to stem from those wanting to create large multi-lingual builds or perhaps they have a strong “Make/CMake” bias. Cargo has answers for these challenges, but of course “the devil is in the details.” Often what is simple for one engineer is a challenge for another, all depending on exposure, time and mindset.
The following comments are partially sampled from comments of known developers and the internet:
- Lifetimes are confusing for many
- Syntax and style is divergent from more common languages
- Fears of additional complexity loom
- Errors can be hard to debug
- Finding support beyond often outdated information from search engines
- Some opined that important libraries are still immature or have warts
- Asynchronous IO in Rust can be difficult
- Most systems programming requires additional levels of coding for “safety”
- Dependence on LLVM in some cases.
A chart from the 2020 Rust survey provides a tad more color on people’s feelings on language feature topics. This turns out to be a good list of how to focus your studies after you are past the basics.
Some view Rust’s “strictness” as a disadvantage while others feel it is a huge asset in the long run. How you feel may dictate to a degree your success. However, if a little extra frustration helps you ship code with a minimized set of bugs, you might think that dealing with some “strictness” is worthwhile.
Rust will depend upon LLVM for the mainstream future. This could be a distinct disadvantage forbidding (or creating undue complexity) use for certain embedded environments, for example. Even with this, many LLVM backends are being created to generate code on some very tiny microcontrollers. The ESP-32 microcontrollers, for example, have been quite popular with hobbyists and seem nicely supported.
There is work in the GCC (GNU Compiler Collection) space that will inevitably bear fruit to help also. Many environments also have a means to cross-compile and use a hardware abstraction layer in C as a helpful way for a particular single-board computer (SBC) or chip. The Cranelift backend is also being adapted for purposes in this space.
While Rust is not a completely alien world for most developers, there is some generalization made about flow and a variety of arcane syntax that must first be mastered to really become productive. This also includes what I refer to as memory lineage (not a Rust term). You need to think a bit about how memory is passed down and managed by the system using the concepts of lifetime, ownership, borrowing, cloning and mutability. Mastering this thinking, however, frees you from the deployment terrors of tumbling garbage. Yes, it can make you wonder if the days of the garbage collector are nearing a conclusion.
Next Up — Part 2
It is evident that the Rust language is on an uptrend and has substantial reasons behind its success, despite a few challenges. That Rust has been adopted in many realms is easily discernible. In the next article, we will consider a few specific areas of adoption and further its compelling story.