FFI helpers for binding to OO