This is a simple example program using the foundationdb C API. Its written & tested on macos; but it should be easy to adapt to work on BSD / linux.
This also demonstrates using libuv to integrate foundationdb into a run loop. Promises are run in the main libuv loop.
Compile with
$ clang test.c -Wall -lfdb_c -I/usr/local/include -luv