Rust 1.77.0: C-style strings, asynchronous recursion, and more

Teacher

Professional
Messages
2,672
Reputation
9
Reaction score
699
Points
113
A release of the general-purpose programming language Rust has been published.

The Rust introduced a new version of the language 1.77.0, which makes it easier to create software and interact with the language.

The update is available to users via the rustup utility. If you already have a previous version of Rust installed, you can upgrade to version 1.77.0 with the $ rustup update stable command. For new users, installation via rustup is available – the link can be found on the official website along with detailed release notes.

Various improvements have been made in version 1.77.0, including the following:
  • Support for C-style strings (c"abc"), which makes it easier to write code to interact with interfaces in foreign languages that require strings that end in zero. Checking for zero bytes inside the string is now performed at the compilation stage.
  • Recursion capability in async fn functions. Previously, due to compiler limitations, asynchronous functions could not call themselves. This is now possible thanks to the use of indirect calls, which allows you to write more flexible asynchronous code.
  • offset_of macro stabilization! to access the byte offset of structure fields, which makes it easier to work with data at a low level, minimizing the risk of introducing undefined behavior into the code.
  • Enabling the strip = "debuginfo" option by default in Cargo build profiles that do not provide debugging information, which reduces the size of the final executable file by excluding debugging information from the standard library.

In addition, new APIs have been stabilized in version 1.77.0, including methods for working with arrays, network addresses, floating-point rounding, as well as improvements for working with slices and managing data access.
 
Top