Code Monkey home page Code Monkey logo

Comments (3)

jakirkham avatar jakirkham commented on July 17, 2024 1

There are a couple of other options beyond the ones already listed. Most notably Boost.Python and SWIG. The former mainly makes sense if you already are writing C++ and use Boost. SWIG exists mainly if you want lots of bindings to your code from many different languages.

That said, having written bindings to Python before, I would recommend Cython. Way less work to get started and way less work to maintain. That said, if you prefer writing/maintaining C normally, C-based would be reasonable.

from squash.

rmax avatar rmax commented on July 17, 2024

What's your preference for the official python bindings? The options are:

  • C-based bindings: Writing C code directly, minimum call overhead. Requires dealing with Python 2/3 support by yourself.
  • Cython-based bindings: a little overhead in the generated wrapping functions but easier to maintain and supports Python 2 & 3 out of the box.
  • CFFI-based bindings: This allows to support PyPy.

From what I have seen in the wild, official bindings are either pure C-based or Cython-based, it's matter of preference of the maintainers.

from squash.

nemequ avatar nemequ commented on July 17, 2024

I really don't have a preference; I don't do Python (or any dynamically typed language if I have a choice), so I don't think I'm really qualified to have an opinion.

The one preference I do have is that I would prefer to have it built, at least optionally, by Squash's build system instead of requiring a second build system (i.e., a setup.py script). I don't mind helping implement the CMake bits.

from squash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.