About f2py, IPC and Wrappers

Here are links to the relevant efforts in LFortran for creating Python wrappers automatically:

Once LFortran matures and can compile most Fortran projects, the workflow that I would like, as a user:

  • Use LFortran to compile my code (using the LLVM backend for example), ensure that everything works
  • Switch to the pywrap backend and generate Python wrappers. At that point we know LFortran fully understands the code, and thus any remaining bugs must be in the pywrap backend.
  • I would like LFortran to wrap any modern Fortran code features, such as classes, derived types, coarrays, etc.

I think there could be a huge opportunity to collaborate with the f2py effort on this. If the f2py maintainers are interested in collaborating on this, I am all for it.

3 Likes