Foreign Function Interface Generation for Dart/Flutter - ffigen

Hello,

I would like to attempt converting the VTK headers so Flutter/Dart can talk to it directly.

Does anyone know / can point me to the core/barebones headers needed for VTK to work?

If anyone is interested in helping, there is a new tool for Flutter/Dart called ffigen to automatically create the interfaces.
https://pub.dev/packages/ffigen

Any help is appreciated.

I see that ffigen only supports C headers, so VTK’s very C++ headers are not of much use here AFAICT. There is the Wrapping/Tools set of APIs that can parse VTK’s headers. Writing a tool to generate Dart/Flutter glue code like we do for Python and Java would probably be the best way to do this.

2 Likes

Okay thank you, appreciate your input. I will look into it.

If you’re interested, I have a project called WrapVTK (https://github.com/dgobbi/WrapVTK) for parsing the VTK header files and extracting information from them. It’s built on top of VTK’s own wrapping infrastructure.

1 Like