Skip to content

Add Lua and R interfaces via SWIG #246

Open

Description

@pascalzauberzeug

I created this issue because my PR will remove the todo list from the readme.

Context
The Python interface is already generated with SWIG (swig/Fields2Cover.i),
so most of the interface definitions exist. SWIG supports Lua and R as
target languages, which would make Fields2Cover usable from those
ecosystems without hand-written bindings.

Tasks

  • Extend swig/CMakeLists.txt with optional Lua / R targets
    (e.g. BUILD_LUA=ON, BUILD_R=ON, both off by default).
  • Check the existing typemaps for Python-specific assumptions.
  • Add a smoke test per language and a CI job.

Open question
Is there actual demand for both languages, or should one come first?
Reactions on this issue can help prioritize.

※

Activity

  1. Gonzalo-Mier commented on Aug 28, 2026

    @Gonzalo-Mier
    Member

    I have tried to solve this issue several times in these years but I've never managed to port F2C to R. The problem I found was that Python SWIG is able to import the complete ABI, so no big changes have to be done. R, on the other hand, requires the specific methods that have to be imported, as R is a language without classes and needs only methods (or something like this).

    In this issue both languages were together because I wrongly assumed once you have one language port made, the others are easy. By preference R due to requests by my collegues, but feel free to choose as you want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions