Rust 1.99 Released With C Variadic Functions, New Stable APIs

Rust 1.99 adds support for defining C-compatible variadic functions, expands raw pointer layout APIs, and stabilizes a new batch of standard library features.

Rust 1.99 is now available, bringing expanded interoperability with C, new capabilities for working with raw pointers, and another round of stabilized APIs across the standard library.

The main change is support for defining C-compatible variadic functions directly in Rust. These are functions that can accept a variable number of arguments, a pattern commonly found in C libraries and APIs.

Rust could already call externally defined variadic functions, such as C’s printf. With version 1.99, developers can implement this type of function in Rust itself.

Another notable improvement concerns raw pointers. Rust 1.99 stabilizes new APIs that allow developers to obtain size and alignment information from raw pointers, including those to dynamically sized data.

The release also updates Rust’s recommendations around Box::leak. Although the behavior has not changed, the documentation now advises developers against leaking memory and then trying to reconstruct and free the same allocation.

Beyond that, Rust 1.99 stabilizes a collection of standard library APIs covering vectors, strings, filesystem timestamps, iterators, and memory handling.

Among the more noteworthy additions are new methods for converting Vec allocations into their individual components and rebuilding them later, support for processing invalid UTF-8 data without unnecessary copying, and new filesystem APIs for modifying file timestamps.

Boxed arrays also gain broader iterator support, while VecDeque receives a new method for retaining elements while traversing from the back of the collection. Finally, Rust 1.99 also includes additional updates across the compiler, Cargo, and Clippy, with the complete list of changes available in the official release notes.

For additional details, see the official announcement.

Existing users managing Rust through rustup can upgrade with rustup update stable.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

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