CFFI bindings to r3