The Rust team released a new version of Rust 1.64.0 today. The main updates in the 1.64.0 stable release are as follows:

use IntoFuture enhance .await

Rust 1.64 is stable IntoFuture characteristic.IntoFuture is a similar IntoIterator characteristics, but IntoFuture not support for ... in ... loop, but changed .await way of working.it can wait for any IntoFuture convert to Future stuff that can help make your API friendlier.

core and alloc C-compatible FFI types in

When calling or being called by the C ABI, Rust code can use c_uint or c_ulong Equal type aliases to match the corresponding type from C on any target without requiring target-specific code or conditionals.

Previously, these type aliases were only available in std available in, so for embedded targets and others can only be used core or alloc The code written in the case cannot use these types.

Rust 1.64 is now in core::fi provided in all c_* Type aliases, and for working with C strings core::f i::CStr. Rust 1.64 also provides alloc::ffi::CStringfor processing only use alloc The C string of the crate.

rust-analyzer is now available through rustup

rust-analyzer is now included as part of the Rust toolset. This makes downloading and accessing rust-analyzer easier and makes it available on more platforms. It is now available as a rustup component and can be installed in the following ways.


rustup component add rust-analyzer

At this point, to run the installed version of rustup, you need to invoke it like this:


rustup run stable rust-analyzer

The next version of rustup will provide a built-in agent so that running the executable rust-analyzer will start the corresponding version.

Cargo improvements

When working with collections of related libraries or binary crates in a Cargo workspace, you can now avoid duplication of common field values ​​between crates, such as common version numbers, repository URLs or rust-version. This also helps keep the values ​​in sync when the crate is updated.

When building for multiple targets, you can now cargo build pass multiple --target option to build all of these targets at once.

Stable API

The implementations of the following methods and features are now stable:

  • [future::IntoFuture]()
  • [num::NonZero*::checked_mul]()
  • [num::NonZero*::checked_pow]()
  • [num::NonZero*::saturating_mul]()
  • [num::NonZero*::saturating_pow]()
  • [num::NonZeroI*::abs]()
  • [num::NonZeroI*::checked_abs]()
  • [num::NonZeroI*::overflowing_abs]()
  • [num::NonZeroI*::saturating_abs]()
  • [num::NonZeroI*::unsigned_abs]()
  • [num::NonZeroI*::wrapping_abs]()
  • [num::NonZeroU*::checked_add]()
  • [num::NonZeroU*::checked_next_power_of_two]()
  • [num::NonZeroU*::saturating_add]()
  • [os::unix::process::CommandExt::process_group]()
  • [os::windows::fs::FileTypeExt::is_symlink_dir]()
  • [os::windows::fs::FileTypeExt::is_symlink_file]()

These types were previously std::fi is stable in the core and alloc Also available in:

  • [core::ffi::CStr]()
  • [core::ffi::FromBytesWithNulError]()
  • [alloc::ffi::CString]()
  • [alloc::ffi::FromVecWithNulError]()
  • [alloc::ffi::IntoStringError]()
  • [alloc::ffi::NulError]()

These types were previously std::os::raw is stable in the core::ffi and std::ffi also available in

  • [ffi::c_char]()
  • [ffi::c_double]()
  • [ffi::c_float]()
  • [ffi::c_int]()
  • [ffi::c_long]()
  • [ffi::c_longlong]()
  • [ffi::c_schar]()
  • [ffi::c_short]()
  • [ffi::c_uchar]()
  • [ffi::c_uint]()
  • [ffi::c_ulong]()
  • [ffi::c_ulonglong]()
  • [ffi::c_ushort]()

For more details, please check: https://github.com/rust-lang/rust/releases/tag/1.64.0

#Rust #Released #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *