






















Note: this blog post is a snapshot of the living roadmap at https://lang-team.rust-lang.org/roadmaps/roadmap-2024.html. Subsequent changes may occur in that version, but not in this blog post. Please see that page for the most up-to-date version.
Rust 1.0 was released in 2015. Since that time, we've seen Rust grow from a small language used for a handful of prominent projects into a mainstay in use at virtually every major tech company.
As we work towards Rust 2024, it's natural to ask what's next for the language. This roadmap provides insight into that question by describing what we, as members of the lang team with input from other Rust teams, would like to prioritize.
We have two goals with this roadmap:
Also see the Rust Compiler Ambitions for 2022, for plans from the Rust Compiler team, and watch the Inside Rust blog for the upcoming roadmap from the Rust Library team.
Rust's goal is to empower everyone to build reliable and efficient software. Success requires not only designing and implementing a great language with great libraries and great tools, but also maintaining a great and supportive community.
Our focus for Rust 2024 is to scale empowerment in many different ways. As we grow, we face increasing challenges in how we can scale the ways in which we empower people to an increasing number of people. This roadmap presents three general themes we plan to focus on:
For each theme, we'll describe our goals for Rust 2024, and give a few examples of the kinds of things that we're working on right now, as well as the kinds of things we would like to do over the next few years.
This roadmap is a starting point. Our intent is to highlight those areas that will have the biggest impact on Rust's success. Specific examples will change over time, whether because they're finished or because new proposals arise. As 2023 approaches, we will revisit these themes to see how much progress we have made, and whether we wish to adjust the list.
Thanks to a consistent focus on ergonomics, Rust has become considerably easier to use over the last few years. Companies building large teams of Rust users report that the typical onboarding time for a Rust engineer is around 3-6 months. Once folks learn Rust, they typically love it. Even so, many people report a sense of high "cognitive overhead" in using it, and "learning curve" remains the most common reason not to use Rust. The fact is that, even after you learn how the Rust borrow checker works, there remain a lot of "small details" that you have to get just right to get your Rust program to compile.
For Rust 2024, we will identify and eliminate many of those patterns and idiosyncrasies that one must learn to use Rust; our goal is to let you focus squarely on the "inherent complexity" of your problem domain and avoid "accidental complexity" from Rust as much as possible.
Async and embedded Rust are areas of particular interest. We have made a lot of strides to support those areas, and they are growing rapidly. Nonetheless, Rust lacks many core capabilities that would be required to make working in those domains not only possible but straightforward and delightful. For Rust 2024, we will close that gap.
Our plan for achieving this vision is to focus on four high-level goals (in order from broad to precise):
dyn Trait more usable: Broaden the set of traits that can be used
with dyn and make working with dyn closer to working with generics.Join the rust-lang Zulip, and either start a thread in the
#t-lang/roadmap-2024
stream, or send a private message to nikomatsakis if you'd like to discuss
privately first.
Current active initiatives in each category include:
return/continue/etc" pattern.dyn Trait more usable:
dyn trait objects from &dyn Subtrait to &dyn Supertrait.Looking beyond the initiatives that are in progress, there's a lot of room for
more improvement. Here are some other ideas we'd like to see. For many of
these ideas, the main thing they need is someone to own the design! If you
might be interested in giving that a try, come to
#t-lang/roadmap-2024
to discuss, or send a private message to nikomatsakis.
String with a "str".#[derive(Clone)] struct MyStruct<T>(Rc<T>) would not require T: Clone,
because Rc<T> can be cloned without it.&u32; since u32 is
Copy, we could automatically make it a reference. We've historically
had some hesitance to add more reference-producing operations, because it
can lead to types the user doesn't expect (such as &&&str). We have
some ideas to simplify those cases and avoid unnecessary
double-references.dyn Trait more usable:
dyn Trait objects,
including passing self by value and handling impl Trait in argument
position (see this post for more
information).Rust's combination of ownership and borrowing, low-level systems control, and powerful extensibility mechanisms like procedural macros makes it a great language for writing libraries. And, thanks to Cargo, using a library in your program only takes a few lines of code. Nonetheless, there are a number of things that library authors can't do, or can't do easily -- for example, they can't control the error messages you see or deploy an "unstable" feature that requires special opt-in to use. For Rust 2024, we want to build features that empower library authors to better serve their users, either by helping to manage the feature lifecycle or by expanding the capabilities of what a library can do.
We encourage people to experiment and explore in the library ecosystem, building new functionality for people to use. Sometimes, that new functionality becomes a foundation for others to build on, and standardizing it simplifies further development atop it, letting the cycle continue at another level. However, some aspects of the Rust language (notably coherence) make it harder to extend the Rust standard library or well-established crates from separate libraries, discouraging experimentation. Other features (such as aspects of method resolution) make it hard to promote best-in-class functionality into the standard library or into well-established crates without breaking users of the crates that first developed that functionality. For Rust 2024, we want to pursue changes that enable more exploration in the ecosystem, and enable stable migration of code from the ecosystem into the standard library.
Our plan for achieving this vision is to focus on four categories of work:
Join the rust-lang Zulip, and either start a thread in the
#t-lang/roadmap-2024
stream, or send a private message to Josh Triplett if you'd like to discuss
privately first.
Current active initiatives in each category include:
Looking beyond the initiatives that are in progress, there's a lot of room for
more improvement. Here are some other ideas we'd like to see. For many of
these ideas, the main thing they need is someone to own the design! If you
might be interested in giving that a try, come to
#t-lang/roadmap-2024
to discuss, or send a private message to Josh Triplett.
Fn traits to define callable objects.criterion officially).extern "safe" providing a subset of
Rust's rich types.The Rust repo is a blizzard of activity. This is great, but it can be overwhelming, particularly if you are trying to figure out the status of some particular thing that you are interested in or would like to contribute to.
To ship Rust 2024 and make Rust all that it can be, we need a system that makes it easy for people to find out what's going on and how they can help. We want to scale our language development through delegation, empowering developers to own and drive the work that they are passionate about. Lang team liaisons and frequent lang team check-in will help ensure quality, stability, and overall coherence. The team itself will have a clear "path to membership" that helps us to maintain our membership and make sure we have the expertise we need.
Our plan for achieving this vision is to focus on four categories of work:
Join the rust-lang Zulip, and either start a thread in the
#t-lang/roadmap-2024
stream, or send a private message to Josh Triplett and nikomatsakis if you'd
like to discuss privately first.
Current active initiatives in each category include:
Looking beyond the initiatives that are in progress, there's a lot of room for
more improvement. Here are some other ideas we'd like to see. If you might be
interested in giving that a try, come to
#t-lang/roadmap-2024
to discuss, or send a private message to Josh Triplett and nikomatsakis.
We hope that this post has given you a taste for what we plan to focus on over the next few years. If you'd like to help us reach these goals, please get involved! We've listed a number of active initiatives for each point, but we've also included a lot of ideas that are looking for an owner. Whether you prefer to code, design, document, or organize, there's work for you to do. And if the only thing you want to do with Rust 2024 is to use it, we welcome that too. Happy Rust hacking to y'all!
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。