<ol class="breadcrumb">
  <li><a href="/">Home</a></li>
  <li><a href="/book/">Book</a></li>
  <li><a href="/book/2-0-0-overview/">Part Two: The Suffusion of Blue</a></li>
  <li class="active">Extra Credit: Write a Foreign Function Interface</li>
</ol>

## Chapter 2.18 --- Extra Credit

# Write a Foreign Function Interface

> "Geniuses and supergeniuses always make their own rules... they do not accept the monkey customs of their lessers."
> <footer>Robert A. Heinlein, <em>Friday</em></footer>

**Revision Note:** *The intro text requires minor expansion, and there should be more exercises.*

Extending on Chapter 2.16, we will now write our own Foreign Function Interface for the Oculus Rift SDK using CFFI.  This particular use case poses some interesting challenges that will hopefully prove more generally useful to you in your career as a Lisp Hacker.

We will also be using this library in Chapters 3.6 and 3.7; so that should be a good motivation to see this through to the end!

## Exercise 2.18.1

**CFFI**

```lisp

```

## Exercise 2.18.2

**More CFFI**

```lisp

```

## Exercise 2.18.3

**Even More CFFI**

```lisp

```

## Exercise 2.18.4

**Grovelling**

```lisp

```

## Exercise 2.18.5

**SWIG**

```lisp

```

## Exercise 2.18.6

**The Oculus Rift SDK**

```lisp

```

## Exercise 2.18.7

**A Basic 3D World**

```lisp

```

<ul class="pager">
  <li class="previous"><a href="/book/2-17-0-debugging-testing/">&laquo; Previous</a></li>
  <li><a href="/book/">Table of Contents</a></li>
  <li class="next"><a href="/book/2-19-0-essential-libs/">Next &raquo;</a><li>
</ul>
