2 ms·
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
by kibwen 8y ago
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.
- hsivonen 8y ago> 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.