On Monday, 4 November 2013 at 18:10:58 UTC, Christian Walde wrote:
Perl has a method to call functions from C code or libraries directly in Perl code, called XS. This works via a macro language that wraps around C and DTRT.

Has anyone done something like this with D in Perl before?

Failing that, is there prior art of calling D code from C?

to get the ABI right, just use extern(C) on the relevant D functions.

however, if the perl interface needs to write wrapper functions based on C headers you will have to write a C header containing the relevant function declarations.

Reply via email to