FFI Workflow¶
Use this when adding or changing any public capability exposed via the C ABI.
Steps¶
-
Add or change the public API in
fatoora-core. -
Expose it in
fatoora-ffi(prefer the macros infatoora-ffi/src/macros.rs). -
Regenerate headers (
cargo build -p fatoora-ffi --release). -
Update language bindings (Python, C/C++) to wrap the new symbols.
-
Add or update binding tests.
-
Do not edit headers manually; they are generated by cbindgen.
FFI Conventions¶
-
Use opaque handles and
*_freefunctions for ownership. -
Return
FfiResult<T>everywhere and map errors viaFfiErrorKind.