libffi-rs (GitHub repository) is a Rust crate that provides bindings to libffi. I've been using the crate for about two years now for Inko, and it works great.
Development of the crate slowed down in recent years, as the author Jesse A. Tov has been busy. To help the author out, I joined as a maintainer, and earlier today I released version 1.0.0 of the libffi crate.
Version 1.0.0 does not introduce any API changes compared to previous versions. What it does introduce is the removal of the dependency on the bindgen crate.
Previous versions of the crate use bindgen to generate libffi bindings at build-time, which requires libclang to be installed. While installing libclang is not a problem on Linux, on macOS and Windows it's a bit more tricky. The bindgen crate also introduces quite the list of build-time Rust dependencies: 37 direct and indirect dependencies to be exact.
Starting with version 1.0.0, these dependencies are no longer necessary. The removal of these dependencies means installing the crate is both easier and faster, while providing the same functionality as before.
For more information about these changes, take a look at this pull request.
Existing users should have no trouble updating to the latest version, as the public API remains unchanged compared to the previous version (0.9.0). To upgrade, change your dependency definition to the following:
[dependencies]
libffi = "1.0.0"
There is an open pull request that improves ARMv7 support, which I would like to include in a future release. Apart from that there are no big plans at this time, as the crate works well enough in its current state.