View mode: basic / threaded / horizontal-split · Log in · Help
March 25, 2012
std.ffi?
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
March 25, 2012
Re: std.ffi?
Alex Rønne Petersen wrote:
> 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.

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
Top | Discussion index | About this forum | D home