Rust 1.80 released with LazyCell and LazyLock, enhanced Cargo checks & exclusive endpoints
Jul 25, 2024 at 7:05 PM

Rust 1.80 released with LazyCell and LazyLock, enhanced Cargo checks & exclusive endpoints

The Rust team has unveiled Rust 1.80, bringing new enhancements to aid in the development of reliable and efficient software. Key features in this release include LazyCell and LazyLock, which defer data initialization until first access, expanding on the OnceCell and OnceLock types introduced in Rust 1.70 by incorporating the initialization function directly within the cell.

Additionally, Cargo 1.80 now enables comprehensive checks for all cfg names and values recognized by rustc, including feature names from Cargo.toml and new cargo::rustc-check-cfg outputs from build scripts. This builds upon the --check-cfg flag stabilized in Rust 1.79.

Rust 1.80 also introduces the use of exclusive endpoints in ranged patterns, formatted as a..b or ..b, aligning with the Range and RangeTo expression types. The release includes several stabilized APIs, alongside various other changes and bug fixes, to improve the overall development experience.

Jul 25, 2024 by Paul

du
ei
duttyend found this interesting
Rust iconRust
  132
  • ...

Rust is a multi-paradigm, general-purpose programming language designed for performance, type safety, and concurrency. It ensures memory safety by guaranteeing that all references point to valid memory without needing a garbage collector. Rated 4.6, Rust's top features include type safety, compiler explanations, and static typing. Top alternatives to Rust are C++, C, and C#.

No comments so far, maybe you want to be first?
Gu