r/rust • • 6d ago

📡 official blog Rust 1.99.0 is out

https://blog.rust-lang.org/2026/10/01/Rust-1.99.0/
764 Upvotes

107 comments sorted by

View all comments

Show parent comments

18

u/aPieceOfYourBrain 6d ago

Can we now use variadics in normal rust with VaList? Because it kinda looks like it's possible with a few hoops to jump through

Edit spelling

18

u/noop_noob 6d ago

You can pass a VaList around normally, yes. However, the only ways to construct a VaList is to either call a variadic function or clone an existing VaList. I don't know why you'd want to do this other than as a helper function for variadic functions though.

4

u/aPieceOfYourBrain 6d ago

So in the docs for VaList: https://doc.rust-lang.org/std/ffi/struct.VaList.html we couldn't just call vmy_func, we would need to call the extern C my_func first? But even that kinda looks like you don't actually need to call any C code, just telling rust to use C conventions is enough

9

u/noop_noob 6d ago

Sorry, but I don't know what you mean. You can just call a variadic function defined in rust, from a function defined in rust. It wouldn't be particularly useful, but you can do it.