Highlights of the Rust 1.68 and 1.69 releases are discussed, including Cargo's sparse protocol, local Pin construction, and default alloc error handler. Stabilized APIs cover from<bool> for f64, UEFI extern, cargo build --verbose, and Make Context !Send and !Sync. Rust 1.68.1 and 1.68.2 are mentioned. Rust 1.69.0 brings Nice PR#42069, more cargo fix, and no more debug info for build scripts. Stabilized APIs include CStr::from_bytes_until_nul and unaligned references as a hard error. Suggest cargo add, search for macros with !, compatibility notes, and Rust 0.1 release notes are covered.
Cargo now suggests automatically fixing certain warnings, providing a quality of life improvement for users.
To improve build times, debug information is no longer included by default when building cargo build scripts.
An API that has been stabilized in this release is the C string from bytes until null, which simplifies working with null-terminated byte strings in Rust.
Deep dives
Cargo suggests automatically fixing warnings
Cargo now suggests automatically fixing certain warnings, providing a quality of life improvement for users. The cargo fix feature allows for automatic code fixes for specific errors and warnings, and usage of this feature is now being encouraged in the cargo interface.
Debug information not included in build scripts by default
To improve build times, debug information is no longer included by default when building cargo build scripts. This change speeds up the build process, especially for projects with build scripts that are not likely to experience panics or require debugging. Debug information can still be included by specifying it in the cargo.toml file.
Backwards Compatibility Notes
There are several backwards compatibility notes in this release, including changes to the minimum required external LLVM version, improvements to Rustdoc search feature for macros, and various updates and modifications to Cargo's behavior and configuration options.
Stabilized API
An API that has been stabilized in this release is the C string from bytes until null, which simplifies working with null-terminated byte strings in Rust. This API allows for creating a C string from a byte slice until the null terminator is reached, making it more convenient and efficient for handling C strings.
Other Updates
There are also other updates in this release, such as improvements to the cargo interface, including recommending the use of cargo add instead of cargo install for library crates, as well as enhancements to Rustdoc's search functionality for macros. Additionally, there are compatibility and performance-related notes that users should be aware of, such as changes to unaligned references and documentation updates.
Jon and Ben discuss the highlights of the 1.68 and 1.69 releases of Rust.
Contributing to Rustacean Station
Rustacean Station is a community project; get in touch with us if you’d like to suggest an idea for an episode or offer your services as a host or audio editor!