www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.ffi?

reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <xtzgzorex gmail.com> writes:
Hi,

I implemented a simple binding/wrapper for libffi in D a while back[1]. 
We have successfully used this to implement native function invocation 
in MCI's IR interpreter. I'm wondering if there is any interest in 
making this a standard module in Phobos (std.ffi or so). If so, I'm 
willing to put in some effort to sanitize and properly document the API.

This means that we will be depending on libffi. I don't know how people 
feel about this. FWIW, the library is available on virtually any POSIX 
system (including OS X). Only Windows doesn't have it.

[1] https://github.com/lycus/libffi-d

-- 
- Alex
Mar 25 2012
parent Jens Mueller <jens.k.mueller gmx.de> writes:
Alex R=F8nne Petersen wrote:
 Hi,
=20
 I implemented a simple binding/wrapper for libffi in D a while
 back[1]. We have successfully used this to implement native function
 invocation in MCI's IR interpreter. I'm wondering if there is any
 interest in making this a standard module in Phobos (std.ffi or so).
 If so, I'm willing to put in some effort to sanitize and properly
 document the API.
=20
 This means that we will be depending on libffi. I don't know how
 people feel about this. FWIW, the library is available on virtually
 any POSIX system (including OS X). Only Windows doesn't have it.
Is it possible to add a plain conversion of the header files to Deimos https://github.com/D-Programming-Deimos? Adding a higher level wrapper on top of the plain conversion to Phobos may be a good idea. But ultimately a package manager should address these issues. Jens
Mar 25 2012