FFI - Foreign function interface

A FFI is an interface for a language, such that it can call procedures or functions from other languages no matter what language they are programed in.

For example this means given scheme code and a target language.

  1. Scheme code can call functions programmed in the target language.
  2. A target language could call a Scheme function.

There are a number of applications of this: Reuse of preexisting libraries and source code are obviously one of the more important aspects. 1) allows to do this by writting code in Scheme, whereas 2) requires code being written in the target language, which can be considerably less comfortable, depending on the language. Also see PPR:ForeignFunctionInterface. An interesting FFI survey is in the context of AutoLisp is Design Issues for Foreign Function Interfaces.

Implementations with this Functionality

to from
SISC Java Java
Chicken C C
plt-scheme C C
Guile C
scheme48 C
gambit C C
bigloo C,Java C,Java
pocket-scheme C (DLL) embeddable
chez C C


Note that this table may be incomplete, I don't know whether Chicken/SISC provide access from C/Java.

The plt-scheme FFI to C is detailed in Foreign Interface for PLT Scheme.


Personally I'll consider the guile thing to be sort of embedded, not ffi.


SISC provides both ways of interaction.