3 ms·
An advantage of Rust and Golang (and OCaml actually[1]) is they let you write to the C ABI. We've written both components that call into existing C ABI (nbdkit
by rwmj 6y ago
An advantage of Rust and Golang (and OCaml actually[1]) is they let you write to the C ABI. We've written both components that call into existing C ABI (nbdkit-{rust|golang}-plugin), and also Rust/Golang/OCaml shared libraries that present C ABI functions / structures to the world.
[1] But you need to write a bit of C glue code for OCaml so it's not quite so seamless.
- bachmeier 6y agoAnd D. It works so well that the compiler has betterC mode: https://dlang.org/spec/betterc.html https://dlang.org/spec/betterc.html
- int_19h 6y agoSome form of C FFI has been standard for most languages that appeared after C became ubiquitous. Even something as dynamic and high-level as Python has ctypes.