News for hackers. Stuff that matters.
Re:How I Wrote a Modern C++ Library in Rust by lightedman on Monday December 03, 2018 @09:36AM (#18589028)
"with a C API in between."

I smell vulnerabilities miles away with that sort of implementation. Hope the Rust programmers remember basic garbage collection in C, since C itself doesn't have it automated.

Re:How I Wrote a Modern C++ Library in Rust by kibwen on Monday December 03, 2018 @11:10AM (#18589838)
Just because it's using a C-style API doesn't mean there needs to be any C code involved at all (I don't know if there is in this case, but in general it's not necessary). You have one side say "hey, pretend this code I've got here is C", and the other side says "hey, let me call this function that I think is C". Every language has a way of calling C functions, so you don't even necessarily need a C compiler.
Re:How I Wrote a Modern C++ Library in Rust by hsivonen on Monday December 03, 2018 @11:16AM (#18589889)
> I don't know if there is in this case

In this case, there indeed is no .c compilation unit between the C++ and Rust code that see each other via C linkage.

Re:How I Wrote a Modern C++ Library in Rust by msbarnett on Monday December 03, 2018 @11:13AM (#18589868)
You should really consider reading the article before commenting on it. The mechanisms for deleting heap memory obtained from Rust are discussed in depth.