What’s new in Rust 1.61
The unique approach of the Rust programming language results in better code with fewer compromises than C, C++, Go, and the other languages you probably use. It also gets updated regularly, often every month.Where to download the latest Rust version If you already have a previous version of Rust installed via rustup, you can access the latest version via the following command:$ rustup update stable The new features in Rust 1.61 Published May 19, Rust 1.61 highlights custom exit codes from main. Rust proponents said that in the beginning, Rust main functions only could return the unit type () either implicitly or explicitly, indicating success in the exit status, and if developers wanted otherwise, they had to call process::exit. Since Rust 1.26, main has been allowed to return a Result, where Ok translated to a C EXIT_SUCCESS and Err to EXIT_Failure. These alternate return types were unified by an unstable Termination trait. In this release, Termination trait is stable, along with a more-general ExitCode type that wraps platform-specific return types. The Termination trait also can be implemented for a developer’s own types, allowing for customization of reporting before converting to an ExitCode.To read this article in full, please click here
The unique approach of the Rust programming language results in better code with fewer compromises than C, C++, Go, and the other languages you probably use. It also gets updated regularly, often every month.
Where to download the latest Rust version
If you already have a previous version of Rust installed via rustup
, you can access the latest version via the following command:
$ rustup update stable
The new features in Rust 1.61
Published May 19, Rust 1.61 highlights custom exit codes from main
. Rust proponents said that in the beginning, Rust main
functions only could return the unit type ()
either implicitly or explicitly, indicating success in the exit status, and if developers wanted otherwise, they had to call process::exit
. Since Rust 1.26, main
has been allowed to return a Result
, where Ok
translated to a C EXIT_SUCCESS
and Err
to EXIT_Failure
. These alternate return types were unified by an unstable Termination trait. In this release, Termination
trait is stable, along with a more-general ExitCode
type that wraps platform-specific return types. The Termination
trait also can be implemented for a developer’s own types, allowing for customization of reporting before converting to an ExitCode
.