Overview of Rust: Current Trends and Deficiencies in the Ecosystem

Overview of Rust: Current Trends and Deficiencies in the Ecosystem

Author | Vitaly Bragilevsky
Translator | Liu Yameng
Editor | Tina

The Rust ecosystem is regularly explored through numerous developer surveys. A careful reading of these reports can provide deep insights into the community and the potential of the technology. For example, the majority of Rust developers have only recently started using the language, which may signal that employers should reconsider their job descriptions and not expect candidates to have 10 years of Rust experience.

The community is growing rapidly. Although the adoption rate in the industry lags slightly behind, tech giants have paved the way. We have also identified weaknesses in the tools, mainly in evaluation analysis and debugging support, which are related to the generally immature technologies in these areas.

In this article, we will share findings and insights about the Rust community and ecosystem, detailing the uniqueness and pitfalls of starting new projects with Rust or migrating from other languages to Rust.

Rustaceans

How many Rust developers (or Rustaceans, as they call themselves) are there? Although counting developers is not an exact science, we have some estimates. In the “SlashData Developer Nation Report 2023” (Q3 2022), SlashData estimated the number of Rust developers at 2.8 million, which is 1/7 of the size of the JavaScript community and less than 1/4 of the C/C++ community.

The survey also indicated that this number has doubled in the past two years, making it one of the fastest-growing developer communities. So, does it still have growth potential?

According to the “Stack Overflow Developer Survey 2022”, among developers who have not used Rust, 17.6% want to use it, making Rust the most anticipated language in the developer community. Given the current trends and the technology’s youth, its future looks promising.

The Rust community is also quite young. According to JetBrains’ “2022 Developer Ecosystem Report”, 60% of developers who use Rust as their primary language are under 30 years old.

The Rust team’s “2021 Rust Survey Report” states that half of the developers have less than 10 years of programming experience in any programming language.

Let’s also take a look at the background programming experience of Rust developers. Regarding the other programming languages they use, the “Rust Status Survey” identified several categories (which may overlap) of Rust developer groups:

  • 41% of Rust developers consider themselves experts in dynamically typed languages (JavaScript, Python, PHP, etc.).

  • 27% consider themselves experts in garbage-collected object-oriented static typed languages (Java, C#, Go, etc.).

  • 20% consider themselves experts in manually managed memory languages (C, C++, etc.).

The “Stack Overflow Survey” also reported a significant interest in Rust among JavaScript, TypeScript, Python, Java, and C++ developers. Interestingly, C developers are less inclined towards Rust, but considering the recent changes in Linux’s policies regarding kernel development and the trend of supporting Rust in other major C-based projects (like curl), this situation may change.

According to the Rust section of the “2022 Developer Ecosystem Status”, only 5% of Rust developers have used the language for more than 3 years. About half of Rust projects are pure Rust projects, while other projects share codebases with JavaScript/TypeScript (22%), Python (15%), C++ (12%), Go (12%), and C (11%) alongside other languages. Searching GitHub for popular repositories with Rust as the primary language reveals that 20% of those repositories also contain Python code, and another 20% contain JavaScript.

Based on this data and my observations of the Rust community, I suspect it is growing due to many young people with backgrounds in Python and JavaScript turning to their first system programming language. This type of language is challenging to learn but offers them a completely new software development experience. Older languages like C and C++ are not as attractive to them, but Rust is.

Technical Domains and Industry Adoption

The Rust team’s surveys show that server-side (backend) projects are the primary technical domain for Rust. Cloud computing infrastructure and applications represent another significant area for applying Rust, while distributed applications are also a popular choice within the Rust community.

Linux is the most targeted platform (77%, while Windows and macOS account for 41% and 36%, respectively). WebAssembly accounts for 22%, while embedded systems account for only 11%. The use of Rust in mobile applications is virtually negligible.

For Rust projects, CLI tools are more popular than GUI applications. This can be attributed to the primary supply of CLI libraries in the ecosystem, while GUI libraries are less common. According to the “2022 Developer Ecosystem Status Survey”, 46% of Rust developers use it for developing CLI tools.

There is a technical domain that, while crucial in showcasing Rust applications, may not be immediately apparent from the numbers: tools provided for other programming languages. We can see that Rust is used in both the JavaScript and Python communities as a high-performance alternative to the tools currently available for these languages. Projects like deno (a JavaScript and TypeScript runtime) and Ruff (a Python linter) are excellent examples of this trend. These open-source projects demonstrate that Rust attracts a significant number of contributors while providing high performance and rapid development speed. The use of programming languages to develop tools has a long-standing tradition. Rust effectively breaks this tradition.

Tech giants like Microsoft, Google, Amazon, and Meta advocate and support Rust. Nevertheless, the “2022 Developer Ecosystem Status Survey” reported that most Rust developers use Rust outside of work. Only 18% of respondents use Rust to develop software in their formal jobs. In the Rust team’s survey, less than half of the respondents considered themselves efficient in using Rust. In the same survey, less than half of the respondents used Rust daily. These figures indicate that others are still learning Rust or occasionally using it as a hobby for personal projects.

The various job postings on different websites do not lead us to conclude that there are thousands of small and medium-sized companies interested in hiring Rust developers. Among the Rust team’s survey respondents, only 15% stated that their companies used Rust in numerous projects, while another 18.5% believed it was used in only a few projects. It seems that the primary way to introduce Rust into companies is by rewriting non-critical components from other languages or starting a new non-essential project in Rust to gauge its effectiveness. The Rust community is actively discussing success and failure stories about transitioning to Rust or starting new projects.

Beginning a Rust journey requires companies to have some senior engineers with long-term Rust experience to oversee the transition. As we have emphasized, there is a lack of this type of developer in the community. Fortunately, this issue will resolve itself over time.

The “2021 Rust Status Survey” identified the underutilization of Rust in the industry as a primary issue. However, this situation is expected to change.

Languages and Tools

One significant advantage of Rust is that it delivers on its promises. Memory safety allows for the elimination of certain types of errors. Google partly attributes the decrease in critical vulnerabilities in the Android system to the adoption of Rust as a memory-safe alternative to C++. Rust’s performance gives Amazon sustainability in energy efficiency. Reduced CPU usage and effective memory management are outcomes of Rust’s language features.

70% of developers who use Rust at work strongly agree that Rust’s performance characteristics (like speed, memory usage, etc.) affect its adoption. Among them, 64% value Rust’s safety and security features. About 80% agree that Rust can help them achieve their goals and offset the adoption costs. 65% of developers believe that Rust’s language and standard library documentation is excellent. These numbers explain why Rust has been the most popular language for seven consecutive years; according to Stack Overflow’s survey, 87% of developers say they want to continue using Rust. Rustaceans are loyal to Rust, and compared to the developers themselves, Rust better illustrates the language and its quality.

38% of Rust team’s survey respondents unanimously believe that programming in Rust is much more complex than in other programming languages. 62% think it requires more effort to learn. They are also concerned that the situation might become even more complicated. This is the second major concern of survey respondents regarding Rust’s future.

All surveys consistently indicate that Visual Studio Code, supported by rust-analyzer, is the most popular IDE for writing Rust. About half of Rust developers use it. The runner-up is JetBrains IDEs (CLion, IntelliJ IDEA, and others) supported by our IntelliJ Rust plugin, with shares ranging from 25% to 40% depending on the survey. Vim/Neovim is the third most popular choice. Two-thirds of Rust developers think their IDE experience is great or good enough.

Diving into the details of the development experience, the surveys show that the most problematic areas are debugging and evaluation analysis. 32% of respondents in the “2022 Developer Ecosystem Status” survey mentioned they miss the native debugging experience. 29% of Rust team’s survey respondents believe the debugging experience could be better. More than half of Rust developers use println-style debugging as their primary way of debugging code issues, with one-third of developers using only this method.

The code evaluation analysis experience is even worse; over 80% of Rust developers do not use performance analysis tools at all. One reason may be that the currently available tools are difficult to use, and their findings are hard to interpret. There is also a lack of educational materials focusing on analysis. Developers seem willing to blindly trust Rust’s performance without conducting actual checks. As Rust becomes more prevalent in the industry, this attitude may become a critical issue. Both evaluation analysis tools and educational materials need serious improvement.

Unfortunately, existing surveys have not yet delved into Rust libraries. We do not have good data regarding the missing library ecosystem. As a young technology, there may be issues of technical completeness, but considering Rust’s good interoperability, this has never been seen as a critical problem.

Conclusion

As is often the case with surveys, these results support some interesting conclusions while debunking some well-known theories. For example, these results suggest that the initial perception of Rust as a C/C++ killer seems irrelevant today. We have no evidence that C/C++ code is being significantly replaced in existing codebases, nor do we expect this to happen in the future. Why? Because C and C++ can continue to work. C++ is evolving, and long-standing issues are being addressed. There is no need to rewrite everything in Rust. Moreover, there is not enough workforce to do this. Nevertheless, starting a new project in C or C++ still requires careful consideration. Rust could also be a great choice for such a project, especially when the target platform is Linux and performance and safety are concerns.

The youth of community members indicates a bright future for Rust. It will not disappear, and its adoption in the industry will continue to rise. As the number of experienced Rust developers increases, we will see more pure Rust projects emerge. Tech giants have already boarded the Rust train, and we expect small and medium-sized enterprises to follow suit soon.

Rust tools are continuously evolving, with many enthusiasts and companies around the world contributing to the tool ecosystem.

To work efficiently with Rust, a deep understanding of its concepts is required, especially regarding ownership, memory management, and concurrency methods. Efficient programming in Rust requires specialized learning and training. This is why the common practice of having developers proficient in other programming languages switch to Rust may be more problematic than switching to other languages. Transitioning from any language requires changing many habits. Do not expect developers to master these concepts and quickly develop new habits on their own; instead, they should be educated and trained in advance.

Original Link:

https://www.infoq.com/articles/rust-ecosystem-review-2023/

Disclaimer: This article is a translation by InfoQ and may not be reproduced without permission.

Today’s Recommended Articles

“2023 Large Language Model Comprehensive Capability Evaluation Report” Released: Domestic products represented by Wenxin Yiyan are about to break through the encirclement

Free version of “Github Copilot”, programming capability doubled?! Google takes on Microsoft, launching a brand new Colab programming platform

Baidu responds to Bing becoming China’s number one desktop search; Alibaba addresses mass layoff rumors; Wenxin Yiyan’s market head angrily refutes iFLYTEK|Q News

China’s “Bell Labs”: Our databases start from the first line of code in the kernel

Overview of Rust: Current Trends and Deficiencies in the Ecosystem

Leave a Comment