Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Rust FFI: Sending strings to the outside world.
> Then we use std::mem::forget to release it from the responsibility of Rust.
CString::into_raw does that whole song and dance for you.
For Vectors you probably want to convert them to boxed slices first, at which point you can use Box::into_raw (to get the slice's head pointer).
There are no comments on this comment yet.
> Then we use std::mem::forget to release it from the responsibility of Rust.
CString::into_raw does that whole song and dance for you.
For Vectors you probably want to convert them to boxed slices first, at which point you can use Box::into_raw (to get the slice's head pointer).