Rust 1.97 Debuts: Zinnia Core, Iroh P2P in Rust

The Rust Foundation has released version 1.97 of the Rust programming language, originally founded by the Mozilla project. Rust is now developed under the supervision of the independent non-profit organization, Rust Foundation. The language places a strong emphasis on memory safety and offers a solution for achieving high task concurrency without the need for a garbage collector or extensive runtime support (runtime is limited to basic initialization and maintenance of the standard library).

Rust’s memory management techniques are designed to eliminate pointer manipulation errors and safeguard against common issues associated with low-level memory handling, such as after-free access, null dereferences, pointers, and buffer overruns. To manage libraries, handle assembly, and manage dependencies, the project is working on developing the Cargo package manager. The crates.io repository serves as a platform for hosting libraries.

Memory safety in Rust is enforced at compile time through various mechanisms, including reference checking, object ownership tracking, consideration of object lifetime (scope), and evaluation of memory access during runtime. Rust also offers protection against integer overflows, mandates the initialization of variable values before use, enhances error handling in the standard library, defaults to immutable references and variables, and employs strong static typing to reduce logical errors.

Key innovations:

  • By default, a new scheme for decorating (mangling) names of functions, global variables, and data structures in compiled object and executable files has been enabled (-Csymbol-mangling-version=v0). This naming decoration helps prevent conflicts when linking different programs by attaching specific context, like the module path and crate package name.

The previous name decoration scheme, based on the Itanium ABI, had drawbacks such as replacing generic parameters with unreadable hashes and parts of the compiler not using the Itanium ABI, necessitating the use of Rust-specific name decoders. In version 1.97, Rust has adopted a new default decoration scheme developed specifically for Rust, free from the noted shortcomings. The old scheme is slated for removal in upcoming releases.

/Reports, release notes, official announcements.