Re:Why I'm Choosing C++
by eridius on Monday February 01, 2016 @01:32AM
(#11010152)
It's not that Rust has a C API, it's that Rust has a simple means by which you can mark a function as using the C calling convention, and export this function as a symbol from your library, which lets anything else that speaks the C calling convention (e.g. C, or plenty of other languages) invoke that function.
[ Parent
| on HN ]
Yeah, I did say exposes C API. It's what most crates that have it, call it.
Saying that a particular crate has a C API makes sense. Saying that Rust has a C API suggests that Rust has some equivalent to e.g. Python or Ruby's C APIs that let you invoke arbitrary Rust code from C, which isn't true.