Celebrities Assist in the Event the Current Situation, Opportunities, and Challenges of Rust on the Slope of Enlightenment

Big Names Support the Ascent to Enlightenment (Part I): The Current Status, Opportunities, and Challenges of Rust #

Hello, I’m Zhang Handong.

This month, at the invitation of Brother Chen Tian, I wrote an additional article for his Geek Time course. 2021 is almost over, and I would like to take this opportunity to review the current status, opportunities, and challenges of the Rust language, hoping to provide a global perspective to friends who are learning Rust. This article contains some objective data, as well as some personal opinions, for reference only.

Rust’s Current Status #

To evaluate the current status of a programming language comprehensively, I believe it should be analyzed from three aspects:

  1. The maturity of the language itself. Start with the language itself to see if its features are complete and conducive to development and learning.

  2. The language’s ecosystem and application scenarios. Starting from the language’s ecosystem, understand which fields the language has begun to lay out.

  3. The ability for sustainable development. Consider from three aspects: whether a language is open or closed, whether the developers behind the language can consistently invest in it, and whether the fields in which the language is commonly applied are sustainable.

So, let’s analyze the Rust language following this method, and you can also use this method to examine other languages.

Language Own Maturity #

Since the stable release of Rust language version 1.0 in 2015, there have been two major releases: the 2018 Edition and the 2021 Edition.

  • 2015 Edition: Rust 0.1.0 ~ Rust 1.0 stable version, themed around “stability”
  • 2018 Edition: Rust 1.0 ~ 1.31.0 stable version, themed around “productivity”
  • 2021 Edition: Rust 1.31.0 ~ 1.56.0 stable version, themed around “maturity”

It can be said that Rust is mature enough to be applied in production environments. But judging the maturity of a programming language actually has a lot of nuances.

The mature standard may differ for different languages because maturity is not an absolute value; it is always relative. For example, which is more mature between Java and Node.js? In the Java ecosystem, the Spring framework has developed for more than a decade and is sufficiently mature. However, in the Node.js ecosystem, there are frameworks like AngularJS, Ember.js that are also considered to be very mature. To say which is more mature has no answer.

However, there are some ideas and corresponding indicators for judging maturity, and we can relatively judge Rust’s maturity through these indicators. They can be broadly categorized into four types: users, language, community activity, and application universality.

Image

  • Users: Number of users, number of StackOverflow questions, number of contributors

User count: Rust has been the most popular language among users for six consecutive years, but the actual number of users can be seen from the TIOBE programming language rankings. As of November 2021, Rust ranks 29th, with a popularity of 0.54%. Any language not in the top 20 of the TIOBE rankings still needs marketing and promotion, meaning Rust is still a niche language.

Number of contributors: As of now, there are 3539 contributors to Rust. Let’s compare it with other languages open-sourced on Github: The popular Go language currently has 1758 contributors; Kotlin has 516 contributors. Looking at popular frameworks, Rails has 4379 contributors. Relatively speaking, Rust has a significant number of contributors.

StackOverflow question count: There are a total of 24924 questions related to Rust, with an average of about 150 questions per week, about 20 per day. Compared to other languages, javascript has 2299100 questions, Java has 1811376 questions, Go has 57536 questions, C has 368957 questions, C++ has 745313 questions. Compared to Go, the number of questions about Rust is almost half that.

  • Language: Error patch/fix frequency, number of unresolved issues, repository statistics, new feature release frequency, stability, API modification frequency, presence of “core contributors”

Error fix/patch frequency. According to Github issues data, Rust visibly averages about one issue fixed every hour. Starting from the first commit by Rust founder Graydon on June 17, 2010, a total of 33942 issues and 49011 PRs have been fixed over ten years. Calculated over 3832 days, this averages to about 8 issues per day, 13 PRs per day.

Number of unresolved issues. There are currently 7515 open issues, which, if resolved at the above average frequency, are expected to be done in about three years. Three years later, another new Edition will be released: 2024 Edition.

Repository statistics, as of now, there are 60500 stars and 15000 watches. New feature release frequency, Rust releases a new stable version every six weeks. Rust is already stable, and its stable version API is basically not changed. Rust has many core developers, organized by working groups, refer to Rust Team Governance.

  • Community Activity: Quantity and quality of documentation, community response frequency

The number and quality of documentation mainly examine API documentation, books, tutorials, and blogs. Rust’s API documentation is quite mature and advanced, and more and more Rust books are available both domestically and internationally. Rust Weekly publishes many Rust-related blogs, videos, and articles from the community every week.

Community response frequency examines how experienced users help new users. Rust communities exist both domestically and internationally, facilitated by groups, forums, offline activities, and more.

  • Application Universality: Degree of commercial support, number of well-known projects and products applied, number of “catastrophic accidents”

In terms of commercial support, the Rust Foundation has been established: Google, Huawei, Microsoft, Amazon, Facebook, Mozilla, Toyota, Activision, and other companies are its board members.

The number of well-known projects and products applied, such as open-source CNCF projects: databases (TiKV), cloud-native (Linkerd, Krustlet), event streaming systems (Tremor), blockchain (Near, Solana, Parity, etc.), Google Android, and support for Rust development from Amazon, Microsoft, and more.

In China, companies using Rust include Ant Financial, PingCAP, ByteDance, Secret Ape, Xita, Sea to Star Map, Non-convex Technology, and more. Many other excellent projects or products are not listed here.

Finally, the number of “catastrophic accidents.” If there are none, it indicates that it has not been used in challenging production environments. Rust has a dedicated security working group, and there is a specific website recording related “catastrophic accidents” in the Rust ecosystem: https://rustsec.org/.

Image

Judging by these standards, the Rust language is doing quite well, so it can be said that the Rust language has basically entered the ranks of “mature languages.”

Language Ecosystem and Application Scenarios #

Of course, the maturity of a language itself is one aspect, and the ecosystem around the language is also very important.

In my Rust 2021 Industry Research Report written in June this year, I mentioned the ecological status of the Rust language. After six months of development, the total download volume of crates has reached 11,012,362,794 times, that is, 11 billion times.

Rust’s application scenarios can basically cover the application areas of C/C++/Java/Go/Python. It can be roughly divided into ten areas:

  1. Data processing and services. Representative products and projects include: TiKV/Timely Dataflow/Vector/tantivy/tremor-rs/databend, etc.
  2. Cloud native. Representative products and projects include: StratoVirt/Firecracker/Krustlet/linkerd2-proxy/Lucet/WasmCloud/Habitat, etc.
  3. Operating Systems: Rust for Linux/Coreutils/Occulum/Redox/Tock/Theseus, etc.
  4. Tools: rustdesk/ripgrep/NuShell/Alacritty, etc.
  5. Machine Learning: Linfa/tokenizers/tch-rs/ndarray/Neuronika/tvm-rs/TensorFlow-rs
  6. Gaming:Veloren/A/B Street/rust-gpu/Bevy/rg3d
  7. Client-Side Development: Lark App cross-platform component/flutter_rust_bridge/Iced/Tauri/egui, etc.
  8. Blockchain/Metaverse: Diem/Substrate/Nervos CKB/Near/Solana/nannou/makepad, etc.
  9. Security: rustscan/feroxbuster/rusty-tor/sn0int/sniffglue, etc.
  10. Infrastructure for other language ecosystems: such as swc/deno/rome, front-end infrastructural tools, WebAssembly technology, etc.

Sustainable Development Capability #

A language’s sustainable development capability can be understood from three aspects: whether it’s closed or open, the language’s own sustainable development ability, and the potential of language company applications.

Rust is completely open-source, and it is one of the world’s largest open-source community organizations. It is coordinated by teams and working groups with different responsibilities. Specific information can be seen on the Rust official website. It currently has 3539 contributors. The current working processes and community of Rust play an active role in the positive and sustainable development of Rust.

On February 9, 2021, the Rust Foundation announced its establishment. Huawei, AWS, Google, Microsoft, Mozilla, Facebook, and other technology industry leaders joined the Rust Foundation as platinum members, committed to promoting and developing the Rust language globally and providing strong financial backing for Rust developers.

Subsequently, companies from various fields like ARM, AUTOMATA, 1PASSword, Toyota, Activision, Knoldus, Tangram, and others joined the foundation to contribute to Rust. Recently, Rust Foundation elected Rebecca, who has fifteen years of experience in non-profit organizations, as the Executive Director (ED) and CEO. Under the leadership of the Rust Foundation, Rust is believed to have a broad application prospect.

Considering the above three aspects, Rust’s potential for sustainable development is very broad.

Rust Opportunities #

We analyze the current situation of Rust to have a more comprehensive understanding of Rust. However, for individuals currently learning Rust, understanding where opportunities for Rust lie in the future may be more helpful for their career planning.

Opportunities for Rust in the Era of Transformation #

At present, the internet technology and renewable energy revolution are opening the curtains of a new industrial revolution, and humanity is standing at the threshold of a new era. A new round of technological revolutions and industrial transformations are emerging worldwide. 5G, low-nanometer chip technology, Internet of Things technology, and artificial intelligence are bringing more possibilities for applications such as smart cities, smart manufacturing, smart transportation, and smart homes.

This means that trillions of devices will be connected to the network. The industry is facing unprecedented heterogeneity in computing, storage, and communication capabilities, as well as new challenges in the scale of data generation and necessary delivery and use.

Building a better future is not easy. The top challenge is security. Due to the wide distribution of connected nodes, the large number, and the complexity of the application environment, the overall security is relatively weakened because conventional security measures, which are not applicable due to limited computing and storage capacity, cannot be applied. If applied in national strategic basic industries such as industry, energy, electricity, and transportation, security issues can cause immeasurable losses.

The infrastructure’s trust chain can be secured as far as it extends. And Rust is the undisputed choice for building trusted systems today, which can be said to be the right tool at the right time.

With Rust’s rich type system and ownership model, memory safety and thread safety are guaranteed, allowing us to eliminate various errors at compile time while achieving performance comparable to C/C++.

Theoretically, because Rust has stricter immutability and aliasing rules than C, it should have better performance optimization than C. However, since surpassing C’s optimization in LLVM is an ongoing effort, Rust has not yet reached its full potential.

Since Rust has no runtime and garbage collection, it is suitable for services with particularly high-performance requirements, able to run on embedded devices, and can easily integrate with other languages. However, the biggest potential lies in the fearless parallelization of most Rust code, whereas the risk of parallelizing equivalent C code is very high. In this respect, Rust is more mature than C.

Rust also supports high-concurrency zero-cost asynchronous programming, and Rust is likely the first system-level language to support asynchronous programming.

In summary, Rust is a general-purpose language like C and has great potential to become the foundational infrastructure for the next fifty years.

Job Opportunities Created by Rust #

Because of Rust’s safety attributes, companies applying Rust in the financial sector are relatively numerous, so the most global Rust job posts are currently in “blockchain” and “quantitative finance”.

At present, global Rust job postings are already very diverse, and the top three in terms of numbers are:

  1. Blockchain / Quantitative Finance / Banking
  2. Infrastructure (cloud-native platform development): Databases/Storage/Data Services/Operating Systems/Containers/Distributed Systems
  3. Platform Tools: Remote Desktop/Remote Service Products/SaaS/Remote Work Products (such as Nexthink)

Additionally, AI/Machine Learning/Robotics, client-side cross-platform component development, security in blockchain/ information security, embedded engineering, advertisers like Adinmo, real-time communication engineer in audio/video, and e-commerce platforms, software consulting.

Regarding specific Rust job postings, you can find them in Rust Weekly, Reddit r/Rust channel, Rust Magazine community magazine, Rustcc forum, and on major job websites.

That’s all for the current status and opportunities of Rust today; the second half will discuss the challenges of Rust.