OpenFX API Wrapper (FFI)


Cross-post: Reddit

I would like to work on a Rust wrapper for the OpenFX API. It’s the first time I do FFI, I am a little lost but I would like to learn. Is anyone interested to collaborate on this project?


The OpenFX API aims to be a standard plug-in API for Image Processing applications. It is used in visual effects applications like Nuke, Natron, Davinci Resolve, …

The API is made of a couple of C headers that define types and functions the plug-in can use or should implement. Most plug-ins are written in c++ and I think this is a domain where Rust could shine.

What I would like to do

  1. Create bindings from the C headers
  2. Create a nice safe API on top of it
  3. Create build script that generates a bundle like asked by the OpenFX standard
  4. Create example plug-ins and a boilerplate


I have already played a little bit and here are the things that are slowing me down at the moment:

  • To create the bindings I would like to use rust-bindgen. I heard good things about it. The problem is that the OpenFX API consists of multiple headers #including each other. Is there a way to preserve the original file structure and have rust-bindgen create a module for every header? Or could I do that manually with rust-bindgen? At the moment when I point it to a header (that includes other headers) it generates bindings for all included headers in one big file.

  • Thinking forward, when the C headers get updated, what is the best way to update the bindings? Assuming the bindings are created with rust-bindgen and then cleaned-up manually. It seems tedious to regenerate all the bindings (depending if the changes are relatively large)


I would gladly accept anyone who wants to contribute. Be it by being a second maintainer, a casual contributor or someone I could go to with my silly questions. Let me know if someone is interested :slight_smile: