The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run-time.
https://www.sourceware.org/libffi/
This installer guides you through the steps necessary to install libffi 3.4.2 for macOS. To get started, click Continue.