On 2014-04-13 11:20, Atila Neves wrote:
The best I could manage was to use the C/C++ API and have that
call the linked in D code by hacking the automatically generated
Makefile. But at least that worked, up to a point. Even though I
linked in Phobos, it crashed when I called writeln (but
core.stdc.stdio.printf was ok).

I have embedded Ruby in a D application. Called methods in both directions. I had no problem. Have a look at this mostly abandoned project [1]. The bindings where created from 1.9.1 (ABI version). Here [2] are the C bindings and here [3] are some wrappers.

Trying to use the C API directly from D didn't really work. I
tried dstep on ruby.h and it threw an exception. Ah, macros...

Please report an issue. It shouldn't be throwing an exception.

[1] https://github.com/jacob-carlborg/orbit
[2] https://github.com/jacob-carlborg/orbit/tree/master/ruby/c
[3] https://github.com/jacob-carlborg/orbit/tree/master/ruby/core

--
/Jacob Carlborg

Reply via email to