News for hackers. Stuff that matters.
Re:Deploying Rust in Existing Firmware Codebases by steveklabnik on Friday September 06, 2024 @02:31PM (#41468589)
> And last time I tried it wasn't even possible to interface with a varargs function.

Calling varargs functions over FFI has been possible since before Rust 1.0, here's printf, for example https://docs.rs/libc/latest/libc/fn.printf.html

Re:Deploying Rust in Existing Firmware Codebases by petabyt on Friday September 06, 2024 @05:35PM (#41469895)
But you would have to manually pass cstrings into it? Is there a way to make a wrapper to pass rust strings into it? Now that I think about it that may have been my issue.
Re:Deploying Rust in Existing Firmware Codebases by steveklabnik on Saturday September 07, 2024 @01:29PM (#41475093)
Correct, Rust and C strings are different, so you have to do some sort of conversion between the two, if you have a String and want to pass a *const c_char.