FFI wrapper for libpuzzle