FFI workflow¶
- Add the capability and its behavior tests in
fatoora-core. - Expose it in the appropriate
fatoora-ffibridge module. Keep core errors structured throughcommon::core_errorand fallible operations withincommon::boundary. Validate text and enum inputs before mutating state. - Run
python scripts/generate_bindings.py; generated files are checked in. This also regenerates the C API from the C headers. Review any new argument shapes and ownership rules in the C API. - Adapt the public Python facade where conversion or ownership requires it.
- Test Rust contracts, real C/C++ callers, and the installed Python wheel. Include failure, consumption, child lifetime, and concurrency cases relevant to the change.
See Diplomat bindings for commands, ownership rules, pinned tools, and packaging requirements, and binding parity for coverage.