Open
Description
I had a talk with @eeeebbbbrrrr about FFI stuff in the context of #1661.
During that conversation, we made mistakes/were confused on which of the two major functions (pg_guard_ffi_boundary
and pgrx_extern_c_guard
) are used for which case (decorating an extern "C" fn rust_callable_by_c(Args) -> Ret { expr }
and decorating an extern "C" { fn c_callable_by_rust(c_type) -> c_type; }
binding declaration) like three times in that conversation. The reason it was only three was that I was talking slowly because I was confused and still only halfway through my second coffee.
We need to make sure which-is-which is eye-bleedingly clear to ourselves. At minimum, via documentation (which could also cover #1406).