This manual documents the Foreign Language Interface (FLI), which provides a toolkit for the development of interfaces between Common Lisp and other programming languages, and supersedes the Foreign Function Interface (FFI).
The manual is divided into three sections: a user guide to the FLI which includes illustrative examples indicating how to use the FLI for a variety of purposes, a reference section providing complete details of the functions, macros, variables and types that make up the FLI, and a guide to the Foreign Parser.
The user guide section starts by describing the ideas behind the FLI, followed by a few simple examples presenting some of the more commonly used features of the FLI. The next chapter explains the existing type system, and includes examples showing how to define new types. This is followed by chapters explaining the FLI implementation of pointers and some of the more advanced topics. Finally, Self-contained examples enumerates relevant example Lisp source files which are available in the LispWorks library.
The reference section consists of a chapter documenting the functions and macros that constitute the FLI, and a chapter documenting the FLI variables and types.
The Foreign Parser section describes a helper tool for generating FLI definitions from a C header file.
The examples files are in a read-only directory and therefore you should compile them inside the IDE (by the Editor command
Compile Buffer or the toolbar button or by choosing
Buffer > Compile
from the context menu), so it does not try to write a fasl file.
If you want to manipulate an example file or compile it on the disk rather than in the IDE, then you need first to copy the file elsewhere (most easily by using the Editor command
Write File or by choosing
File > Save As
from the context menu).
LispWorks Foreign Language Interface User Guide and Reference Manual - 29 Sep 2017