[pypy-dev] Python FFI

Stefan Behnel stefan_ml at behnel.de
Tue May 15 17:30:09 CEST 2012


Skip Montanaro, 15.05.2012 17:14:
>> So we would like to propose something (a bit more publically than the
>> two subprojects of PyPy attempting to do that --- did you know about
>> their existence?).
> 
> No, can you provide references?
> 
>> The simplest FFI we know of for a high-level language is LuaJIT's FFI.
>>  If you are interested, read the four pages starting at
>> http://luajit.org/ext_ffi.html....
> 
>> So we would like to propose some design very similar to that one....
> 
>> Opinions?  Interests?  This mail is deliberately low on details about
>> how we think we can do it.  Instead I'm seeking general reactions for
>> now and would like to move this soon to its own project, independent
>> of PyPy.
> 
> I'm no great fan of C++, but work in an environment where C++ support
> is a must.  (We currently used Boost.Python.)  The Lua docs didn't
> mention C++.  Do either of the PyPy subprojects you mentioned address
> C++ interfaces?  Do you plan to support it?

AFAIR, C++ can't be connected through a ctypes-like call time API per-se,
because it lacks a well defined ABI. It could be done through runtime
generation of interconnection code, although that involves some dependencies.

Stefan



More information about the pypy-dev mailing list