The core team behind Rust has put together a roadmap of the new features and improvements expected for the language this year.
The Rust programming language is slowly but steadily making a name for itself as a solid alternative to high-performance languages like C++.
"In short, 2019 will be a year of rejuvenation and maturation for the Rust project," Rust's core team wrote in a post
, adding they would focus on better governance, finishing long-standing requests, and improving the quality of the language and its tooling.
Rust is popular with programmers who want the high performance of C and C++ but who don't want the hassle of manually managing memory. The team behind Rust have described it as "like a mix of Ruby, Haskell, and Scala. It has functional influences such as closures and iterators, and a rich type system similar to Haskell".
Rust may be a relative niche language in terms of demand, but it's got a wide range of uses, including creating software for the web, embedded computers, distributed services, and the command line. It's also associated with highly paid roles, with the language being the eighth highest language overall in terms of salary in this year's Stack Overflow Developer Survey. If you're interested in learning more about Rust, TechRepublic has rounded up the best free resources online.
Five new features and improvements heading to Rust in 2019
1. Better developer tools
Developer tooling should improve, with an overhaul of the Rust Language Server (RLS) that allows Rust-related features to be supported by a wide range of the IDEs (Integrated Developer Environments) used by developers to write and edit the code.
While the existing RLS enables IDEs to support functionality such as 'go to definition', symbol search, reformatting, and code completion, work is ongoing to enable a "truly first-class IDE experience" when writing and editing Rust.
Focusing on achieving this is the RLS 2.0 project
, which is working to more closely integrate the RLS with the rustc compiler. RLS 2.0 will build a prototype of the new front-end for rustc compiler, with a view to enabling Rust developers "to get the IDE experience we truly want", according to the official roadmap.
2. Faster code compilation
Before Rust code can be executed it needs to be compiled, transformed into instructions that a computer can run.
Improving the speed at which Rust code is compiled has long been a goal for the core team behind Rust and in 2019 the aim for the compiler is "improving 'core strength' by lowering raw compilation times and also generating better code".
Those improvements are being made possible by a range of projects. A core effort will parallelize the rustc compiler, resulting in faster compilation times and better responsiveness of IDEs.
Another project will optimize one of the stages in the multi-step conversion process that translates Rust code to low-level machine instructions, with new optimizations at the MIR
(mid-level IR) stage. Not only will this improve the quality of the code generated but it may reduce the time it takes to complete the next stage of the compilation process during the LLVM IR stage.
3. Async/await and other new language features
Held over from last year's roadmap, this feature will allow developers to more easily write efficient code that runs asynchronously.
An example might be calling a function that will take an undetermined time to return a result. Rather than blocking any other instructions from being run while waiting for that function to return its result, the async and await keywords provide a way for Rust to pause what it's currently doing and to run other instructions until that result is returned, at which point Rust can pick up where it left off.
4. New features for Cargo
Rust's Cargo build system and the package manager will receive many new features, including better support for cross-compilation - compiling code to run on a platform other than one the compiler is being run on, support for custom commands, and the addition of custom registries and offline mode.
5. Better security
A security working group are focusing on how to deliver security updates to Rust in a timely manner, improving code authentication, reducing the use of unsafe code, and better verification of the standard library.