Foreign function interface

The term comes from the specification for Common Lisp, which explicitly refers to the programming language feature enabling for inter-language calls as such;[citation needed] the term is also often used officially by the interpreter and compiler documentation for Haskell,[1] Rust,[2] PHP,[3] Python, and LuaJIT (Lua)[4][5]: 35 .

Foreign function interface has become generic terminology for mechanisms which provide such services.

The term foreign function interface is generally not used to describe multi-lingual runtimes such as the Microsoft Common Language Runtime, where a common substrate is provided which enables any CLR-compliant language to use services defined in any other.

In addition, many distributed computing architectures such as the Java remote method invocation (RMI), RPC, CORBA, SOAP and D-Bus permit different services to be written in different languages; such architectures are generally not considered FFIs.

There are some special cases, in which the languages compile into the same bytecode VM, like Clojure and Java, as well as Elixir and Erlang.