cffi backend implementation