Interoperability

Rust has excellent support for interoperability with other languages. This means that you can:

  • Call Rust functions from other languages.
  • Call functions written in other languages from Rust.

When you call functions in a foreign language we say that you're using a foreign function interface, also known as FFI.

  • This is a key ability of Rust: compiled code becomes indistinguishable from compiled C or C++ code.

  • Technically, we say that Rust can be compiled to the same ABI (application binary interface) as C code.