← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

Rust 1.99.0 Released, Stabilizing C-ABI Variadics and Raw Pointer Layout Info

🔄 Updated 22h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Rust 1.99.0 stabilizes C-ABI variadic functions.
  • Raw pointer layout information for Sized and non-Sized types is now stable.
  • Documentation for Box::leak updated to discourage deallocation patterns.
  • Box::into_non_null is now preferred over Box::leak for certain patterns.

C-ABI Variadics Stabilized

Rust 1.99.0 now supports defining C-ABI variadic functions using "C" and "C-unwind" ABIs. This allows Rust functions to accept a variable number of arguments, similar to C's `va_list` type. Previously, Rust could only call externally defined variadic functions, but now developers can implement them directly in Rust.

The `VaList` type, which is ABI-compatible with C's `va_list`, is used for these functions. The `VaArgSafe` trait guards which types can be read from a `VaList`. This release also stabilizes support for defining naked variadic functions with non-"C" ABIs via inline assembly.

Raw Pointer Layout Information

The release clarifies the safety requirements for retrieving size and alignment information from raw pointers for both `Sized` and non-`Sized` types. This is achieved by stabilizing three specific functions. This change provides more consistent and safer ways to handle memory layout when working with raw pointers.

Box::leak Documentation Update

While no language semantics changed for `Box::leak`, its documentation has been updated. The new guidance recommends against patterns that deallocate memory after using `Box::leak`. This recommendation addresses problematic interactions with current and future compiler optimizations, especially with the upcoming stabilization of custom allocators.

Developers are now advised to prefer `Box::into_non_null` over `Box::leak` for scenarios where deallocation might occur, as `Box::into_non_null` is designed for such use cases without the potential issues associated with `Box::leak`.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~34 min · 27 stories · Oct 02

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Rust 1.99.0 has been released, introducing stable support for defining C-ABI variadic functions and clarifying safety requirements for retrieving layout information from raw pointers. These updates allow Rust developers to write C-compatible variadic functions directly in Rust and provide clearer guidelines for memory management with raw pointers.