2 min read

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

cargo fix

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.

cargo clippy

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

To have a detailed information on Rust 1.29, read its release notes.

Read Next

Deno, an attempt to fix Node.js flaws, is rewritten in Rust

Working with Shared pointers in Rust: Challenges and Solutions [Tutorial]

Rust Language Server, RLS 1.0 releases with code intelligence, syntax highlighting and more

 


Subscribe to the weekly Packt Hub newsletter. We'll send you the results of our AI Now Survey, featuring data and insights from across the tech landscape.

* indicates required