Yesterday, the Rust team announced next version release of their systems programming language, Rust 1.29.
Users using the previous versions of Rust installed via rustup, can easily get this latest version by a simple command:
$ rustup update stable
This Rust 1.29 release has lesser features. This is because the 1.29 cycle was spent preparing for the upcoming releases, Rust 1.30 and 1.31 that will have a lot more features in them.
What’s new in Rust 1.29?
This stable release of Rust has two most important improvements to Cargo, Rust’s package manager. The new improvements include
- cargo fix can automatically fix your code that has warnings
- cargo clippy is a bunch of lints to catch common mistakes and improve your Rust code
Rust 1.29 includes a new subcommand for Cargo known as cargo fix. This is the initial release of cargo fix that fixes a small number of warnings in the compiler. The compiler has an API for this, and it only suggests fixing lints that the team says, recommends correct code. Over time, cargo fix can be expanded based on user suggestions to automatically fix more warnings.
Clippy has a large number of additional warnings that users can run against their Rust code.
Users can now check out a preview of cargo clippy through Rustup, by the following command:
$ rustup component add clippy-preview
Clippy has not yet reached 1.0. However, its lints may change. The Rust team will release a clippy component once it has stabilized. Users can’t use clippy with cargo-fix yet, really. This is still in work in progress.
Additional updates in Rust 1.29
- The Rust version 1.29 also include some library stabilizations. The three APIs stabilized in this release are:
- Users can also compare &str and OsString.
To have a detailed information on Rust 1.29, read its release notes.