BLOG

  1. HOME
  2. ブログ
  3. 未分類
  4. Rust Lang Roadmap for 2024 Inside Rust Blog

Rust Lang Roadmap for 2024 Inside Rust Blog

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 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.

  1. These studies validated that the above functionality is sufficient to use async function in traits for all kinds of things, though some situations require workarounds (hence the “MVP” title).
  2. As
    2023 approaches, we will revisit these themes to see how much progress we have
    made, and whether we wish to adjust the list.
  3. At first, this seems like a crucial limitation, since many of the use cases require dynamic dispatch!
  4. 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. 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. 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. 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 Roadmap 2024

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. As of now, all of the functionality described in this blog post is available on the nightly compiler. Some of this work was implemented using experimental feature gates so that we could conduct case studies and prove out viability; we are in the process of authoring RFCs for those features now (full details below).

Our next immediate goals are to ship dynamic dispatch and async closures support in 2024. Together this will complete a solid foundation to tackle future async problems, such as support for async drop, easy async iterators, or portability across runtimes. These studies validated that the above functionality is sufficient to use async function in traits for all kinds of things, though some situations require workarounds (hence the “MVP” title). Looking beyond the initiatives that are in progress, there’s a lot of room for
more improvement. 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.

Companies building large teams of Rust users
report that the typical onboarding time for a Rust engineer is around 3-6
months. 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. Since async fn is sugar for a regular function returning impl Future, these two syntactic forms will work interchangeably.

Omni Agent Solutions, A Professional Legal Case Administration Company

The async working group’s headline goal for 2023 is to stabilize a “minimum viable product” (MVP) version of async functions in traits. We are currently targeting Rust 1.74 for stabilization. This post lays out the features we plan to ship and the status of each one. We encourage people rust omni fegs 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.

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. For example, all blocks in an if/else expression need to be valid when cfg! While the former enables conditional compilation, the latter conditionally
evaluates to true or false literals allowing for checks at run-time. You can find the complete timeline in our github project.

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. 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. The case studies revealed two situations that the MVP doesn’t support very well, but both of them have workarounds available. These workarounds are mechanical and once the MVP is available on stable it will be possible to automate them via a custom derive or other crates on crates.io.

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. 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. 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. 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. Thanks to a consistent focus on ergonomics, Rust has become considerably easier
to use over the last few years.

Send bounds are verbose, especially for traits with lots of methods

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. 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. There is one complication that arises when using async functions in traits that doesn’t arise with sync functions. Many async runtimes — notably including the default configurations of Tokio and async-std — use a work stealing thread scheduler. This means that futures may move between worker threads dynamically to achieve load balancing.

Theme: Help users help each other

As a result, the future must only capture Send data. In November, we blogged about nightly support for async fn in trait and identified some key next steps, most importantly support for send bounds to allow spawning in generic functions. Since then we’ve done a significant amount of design https://cryptolisting.org/ exploration and collected a set of case studies evaluating how well the current code works in practice. 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.

At first, this seems like a crucial limitation, since many of the use cases require dynamic dispatch! One can define an “erased” trait internally to your crate that enables dynamic dispatch. The process was pioneered by crates like erased serde and is explained in detail in the builder-provider case study.

The easiest way to explain what we are going to stabilize is to use a code example. To start, we will permit the use of async fn in trait definitions… 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. Rust provides a Foreign Function Interface (FFI) to C libraries. Foreign
functions must be declared inside an extern block annotated with a #[link]
attribute containing the name of the foreign library.

  • コメント ( 0 )

  • トラックバックは利用できません。

  1. この記事へのコメントはありません。

関連記事