The Rust Core development team has reported that the first release of Rust 2018 will be ready on December 6, 2018, corresponding to Rust 1.31. The new TAB incorporates a number of new features since Rust 2015 was first released, further enriching the language features.
Rust 2018 focuses on improving language productivity by focusing on compiler performance, optimizing language features, and further improving tools, libraries, and documentation. Some of the new language features of Rust 2018 have been announced in the most recent Rust release notes and may appear in releases prior to the official Rust 1.31 release, including: Impl traits, macros 2.0, SIMD support, generators, non-lexical lifetimes, async/await support, and module transformations.
Most notably, Rust 2018 will relax its stability guarantee to some extent, providing support for language changes that may break existing Rust 2015 code. For example, Rust 2018 will include the try keyword, which may conflict with function or variable names in some code.
To address this and other similar issues, and to help developers transition from Rust 2015 to Rust 2018, Rust will follow the steps of C++ and Java, which have the following implications:
-
Rust 2018 is opt-in. If you want to use Rust 2018 in an existing project, add edition=’2018′ to the project cargo. Toml. If the version key is missing, the Rust compiler will default to Rust 2015. All new projects created using Cargo New are added to edition=’2018′ by default.
-
Because the Rust compiler will be able to support both Rust 2015 and 2018, project dependencies and versions of Rust 2015 and Rust 2018 can be mixed without problems. This means that you will be able to use Rust 2015 dependencies in Rust 2018 applications as well as Rust 2018 projects.
-
The language core will remain the same, which means Rust 2018 will include only superficial changes, such as the aforementioned try keyword, or the conversion of some warnings to errors.
In addition, Rust 2018 will include a new tool, Cargo Fix, that will help developers transform existing code bases, implementing step-by-step transformations of code to adopt new features and idioms recommended by Rust 2018.
The Rust core team released Rust 1.28 earlier this month: the introduction of a global allocator that allows developers to provide their own memory allocator in place of a system allocator; NonZero numeric type for memory optimization; Improved error messages and formatting.
Rust 2018 is Approaching: Managing the Transition from Rust 2015