Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2095

Move away from SWIG to CFFI

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: proton-c-0.29.0, proton-c-future
    • Fix Version/s: proton-c-future
    • Component/s: python-binding
    • Labels:
      None

      Description

      SWIG is fine but we're not using it for anything other than exporting all of proton-c's API as is.

      Unfortunately SWIG only generates CPython extension bindings. This may be a problem on PyPy where CPython extensions are either slow or simply won't compile.

      Unlike SWIG, CFFI is portable both on CPython and PyPy.

      It also satisfies the same requirements as SWIG currently does.

      In addition, calls to CFFI simply release the GIL which will help parallelizing Python applications using threads.

      By using CFFI we can also get rid of all of our setup.py code and simply use it to build the extension. We will also no longer have problems building wheels.

      The newest version of CFFI supports pkg-config so we can use that to find proton-c easily.

      I'm willing to help with the refactor but I'll need a mentor since I'm not familiar with the code base.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              the_drow Omer Katz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: