Oct 25, 2026

Rust 1.99.0 stabilizes C-variadic functions written in Rust and raw-pointer layout queries

The release also updates Box::leak guidance and stabilizes new APIs such as Vec::into_parts and Box::into_non_null.

Rust 1.99.0 is out. The headline language change is that functions with C-style variable argument lists can now be defined in Rust, using the C and C-unwind ABIs. Rust could already call such functions, for example printf from libc. The argument list type is VaList, and the VaArgSafe trait limits which types can be read from it.

The release also settles safety requirements for reading size and alignment through raw pointers, including pointers to unsized types. Three functions are stabilized for this: Layout::for_value_raw, mem::size_of_val_raw and mem::align_of_val_raw.

The documentation for Box::leak now recommends against patterns that later free the leaked memory. The team says such code interacts badly with current and possible future compiler optimizations, and with the upcoming stabilization of custom allocators. Box::into_non_null or Box::into_raw are preferred, and the same advice applies to other leak functions in the standard library.

Newly stable APIs include Vec::into_parts, Vec::from_parts, Box::into_non_null, Box::from_non_null, VecDeque::retain_back, std::fs::set_times and String::from_utf8_lossy_owned. Developers can update with rustup update stable and review any code that frees memory after calling Box::leak.

Sources

Verified Oct 25, 2026 (official source). rustreleaselanguage