Add a C API, and add some basic smoke tests against it as well as the main C++ frontend.